Container resource allocation method and device, computer equipment, computer readable storage medium and computer program product

By obtaining the timing data of container resources, using the difference degree segmentation and generating resource portrait results, the problem of inaccurate allocation of container resources is solved, the automatic allocation of container resources is realized, and resource utilization and system stability are improved.

CN119025280APending Publication Date: 2024-11-26CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411193545.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the prior art, the container resource allocation method is not accurate enough, resulting in resource allocation errors, making it difficult to meet business needs in different time periods, affecting system stability and resource utilization.

Method used

By obtaining the timing data of container resources, using the difference between the timing data to segment data, generating resource portrait results, and determining the resource allocation plan for each time period based on the resource portrait results, realizing the automated and intelligent allocation of container resources .

Benefits of technology

It improves the accuracy of container resource allocation, avoids the problem of waste or insufficient resources, meets the resource needs of different time periods, and improves system stability and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025280A_ABST
    Figure CN119025280A_ABST
Patent Text Reader

Abstract

The invention relates to the field of artificial intelligence, and particularly discloses a container resource allocation method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring time sequence data of container resources which are actually used; determining a data segmentation result corresponding to the time sequence data according to a first difference degree between the time sequence data; determining a data range corresponding to each segmented data set in the data segmentation result; utilizing the data range and the data segmentation result to generate a resource portrait result corresponding to the container resource; and according to a resource portrait result, generating a resource allocation scheme in a time period corresponding to each segmented data set. By adopting the method, the characteristics of the use conditions of the container resources in different time periods can be quantified by utilizing the first difference degree of the time series data, automatic and intelligent portraying of the container resources is realized, and an accurate resource allocation scheme is given based on the data range of each segmented data set in the resource portraying result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for allocating container resources. Background Art

[0002] As more and more systems are deployed in containers, operation and maintenance personnel need to regularly inspect the use of container resources and adjust the allocation of container resources used by different services in the system according to the actual business scale of the system and the expansion and contraction requirements of production or testing. Therefore, how to calculate a reasonable resource allocation method based on the actual production data or test data of the system has become a difficulty in actual production and testing work.

[0003] In the traditional way, when configuring resources for containers, the operation and maintenance personnel generally need to summarize and analyze the usage of container resources based on their personal experience to form a container resource profile. Then, based on the container resource profile, they can determine how many container resources need to be applied for and configured to support the normal operation of system business functions. However, since human judgment is prone to errors, the existing container resource allocation method is not accurate enough. Summary of the invention

[0004] Based on this, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium and computer program product for allocating container resources with higher accuracy in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a method for allocating container resources, comprising:

[0006] Obtain the time series data of container resources actually used;

[0007] Determining a data segmentation result corresponding to the time series data according to a first difference between the time series data;

[0008] Determine a data range corresponding to each segmented data set in the data segmentation result;

[0009] Generate a resource portrait result corresponding to the container resource by using the data range and the data segmentation result;

[0010] According to the resource profiling result, a resource allocation plan for a time period corresponding to each of the segmented data sets is generated.

[0011] In one embodiment, generating a resource allocation scheme for a time period corresponding to each of the segmented data sets according to the resource profiling result includes:

[0012] Obtaining the original resource request amount corresponding to each of the time periods;

[0013] Determine, according to the upper limit value corresponding to each of the segmented data sets in the resource profiling result, a configuration recommendation value for the time period corresponding to each of the segmented data sets;

[0014] A resource allocation scheme corresponding to each of the time periods is generated according to the configuration recommendation value and the original resource request amount in each of the time periods.

[0015] In one of the embodiments, generating a resource allocation scheme corresponding to each of the time periods according to the configuration recommendation value and the original resource request amount in each of the time periods includes:

[0016] Determine a second difference between the configuration recommendation value and the original resource request amount in each of the time periods;

[0017] A resource allocation scheme corresponding to each of the time periods is generated according to the original resource request amount in each of the time periods and the configuration adjustment level matched by the second degree of difference in each of the time periods.

[0018] In one embodiment, generating a resource allocation scheme for a time period corresponding to each of the segmented data sets according to the resource profiling result includes:

[0019] Determine the resource allocation value corresponding to each application in each time period according to the resource profiling results corresponding to each application in the business system;

[0020] A resource allocation scheme corresponding to the business system is generated according to the resource allocation values ​​corresponding to each of the applications.

[0021] In one embodiment, determining the data range corresponding to each segmented data set in the data segmentation result includes:

[0022] Determine the data centroid corresponding to each of the segmented data sets;

[0023] Determining a data radius corresponding to each of the segmented data sets according to the extreme value in each of the segmented data sets and the data centroid;

[0024] A data range corresponding to each of the segmented data sets is generated by using the data centroid and the data radius of each of the segmented data sets.

[0025] In one embodiment, determining the data segmentation result corresponding to the time series data according to the first difference between the time series data includes:

[0026] Using the distance between each data point in the time series data, construct a distance sequence corresponding to the time series data;

[0027] Using a preset monotonically increasing function, the distance sequence is converted into a corresponding distance evaluation matrix;

[0028] Traversing each of the data points in the time series data, and performing the following operations: determining an approximate cost from the starting data point to the current data point using a distance evaluation matrix from a starting data point of an initial traversal to a current data point of a current traversal;

[0029] Determining a change point in the time series data according to a first difference degree of the approximate cost;

[0030] The time series data is segmented using the change points to obtain the data segmentation result.

[0031] In a second aspect, the present application also provides a container resource allocation device, including:

[0032] The data acquisition module is used to obtain the time series data of the container resources actually used;

[0033] A data segmentation module, configured to determine a data segmentation result corresponding to the time series data according to a first difference between the time series data;

[0034] A range determination module, used to determine the data range corresponding to each segmented data set in the data segmentation result;

[0035] A resource portrait module, used to generate a resource portrait result corresponding to the container resource by using the data range and the data segmentation result;

[0036] The resource allocation module is used to generate a resource allocation plan for a time period corresponding to each of the segmented data sets based on the resource profiling results.

[0037] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method for allocating container resources described in any one of the embodiments of the first aspect is implemented.

[0038] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for allocating container resources described in any one of the embodiments of the first aspect above is implemented.

[0039] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the method for allocating container resources described in any one of the embodiments of the first aspect above.

[0040] The above-mentioned container resource allocation method, device, computer equipment, computer-readable storage medium and computer program product obtain the time series data of the container resources actually used, determine the data segmentation results corresponding to the time series data according to the first difference between the time series data, determine the data range corresponding to each segmented data set in the data segmentation results, generate resource portrait results corresponding to the container resources using the data range and the data segmentation results, generate resource allocation plans for the time period corresponding to each segmented data set according to the resource portrait results, and can use the first difference between the time series data to quantify the characteristics of the use of container resources in different time periods, so as to realize the automatic and intelligent portrait of container resources. At the same time, because the resource portrait results contain the data range corresponding to each segmented data set, it is possible to give accurate resource configuration values ​​based on the data range, thereby improving the accuracy of the generated resource allocation plan corresponding to each time period. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 is an application environment diagram of a method for allocating container resources in one embodiment;

[0043] Figure 2 A schematic diagram of a flow chart of a resource allocation solution generation step in one embodiment;

[0044] Figure 3 is a schematic diagram of the architecture of a business system 300 in one embodiment;

[0045] Figure 4 A schematic diagram of a flow chart of a data range determination step in one embodiment;

[0046] Figure 5 A schematic diagram of a flow chart of a data segmentation result division step in one embodiment;

[0047] Figure 6 is a flow chart of a method for allocating container resources in another embodiment;

[0048] Figure 7is a schematic diagram of a data segmentation result in one embodiment;

[0049] Figure 8 A schematic diagram of a resource profiling result in one embodiment;

[0050] Fig. 9 is a structural block diagram of a container resource allocation device 900 in one embodiment;

[0051] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0053] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0054] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations. The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with relevant provisions of national laws and regulations.

[0055] In one embodiment, Figure 1 As shown, a method for allocating container resources is provided. This embodiment uses the method applied to a server as an example. It can be understood that the method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be, but is not limited to, various personal computers, laptops, smart phones, and tablet computers. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0056] In this embodiment, the method includes the following steps S102 to S110. Among them:

[0057] Step S102, obtaining time series data of container resources actually used.

[0058] The container resources may include but are not limited to any one or more of a variety of resources such as CPU resources, memory resources, and network resources.

[0059] Time series data can be used to represent a raw time data sequence constructed using container resource usage values ​​collected at each moment.

[0060] Exemplarily, the server can detect in real time the actual container resource value used by the currently running container at each moment. Alternatively, the server can also read the historical monitoring data of the container resource usage from the local database or terminal device, and extract the actual container resource value used at each moment from the historical monitoring data. Using the container resource value and the moment corresponding to the container resource value, multiple data points corresponding to the container resource are determined. According to the order between the moments, the multiple data points are sorted, and the sorted data points are used to construct the original time data sequence, thereby obtaining time series data.

[0061] Step S104: determining a data segmentation result corresponding to the time series data according to the first difference between the time series data.

[0062] Exemplarily, the server can perform calculations on each data point in the time series data, such as subtracting the container resource values ​​corresponding to each data point, or calculating the Euclidean distance between each data point, so as to obtain the first difference between each data point in the time series data. The data point whose first difference is greater than a preset threshold, or whose first difference suddenly changes, is regarded as a change point. The time series data is segmented using the change point. For example, starting from the starting data point in the time series data to the first change point position in the time series data, there is a segmented data set. Starting from the data point after the first change point position to the next change point position, there is another segmented data set. Thus, a data segmentation result consisting of multiple segmented data sets is obtained.

[0063] Step S106: determine the data range corresponding to each segmented data set in the data segmentation result.

[0064] Optionally, in some embodiments, the server may traverse all data points in each segmented data set for comparison, determine the maximum data point and the minimum data point in each segmented data set, and determine the data range corresponding to each segmented data set using the maximum data point and the minimum data point in each segmented data set.

[0065] Alternatively, in some other implementations, the server may also perform calculations on the data points in each segmented data set to determine the mean of the data points. According to the difference between each data point in each segmented data set and the mean, the upper limit value and the lower limit value of the data point are determined. The data range corresponding to each segmented data set is determined by using the upper limit value and the lower limit value of the data point of each segmented data set.

[0066] Step S108, using the data range and the data segmentation result, generating a resource portrait result corresponding to the container resource.

[0067] For example, the server can use the data points of each segmented data set in the data segmentation result to draw a corresponding curve graph, and use the data range corresponding to each segmented data set to draw the upper and lower bounds corresponding to each segmented data set, thereby obtaining a resource portrait result corresponding to the container resource.

[0068] Step S110: Generate a resource allocation plan for a time period corresponding to each segmented data set based on the resource profiling result.

[0069] Exemplarily, the server may utilize the upper bound value, average value or median value corresponding to each segmented data set in the resource profiling result as the resource allocation amount for the time period corresponding to each segmented data set, thereby generating a resource allocation plan for the time period corresponding to each segmented data set.

[0070] In the above container resource allocation method, by obtaining the time series data of the container resources actually used, according to the first difference between the time series data, the data segmentation results corresponding to the time series data are determined, the data range corresponding to each segmented data set in the data segmentation results is determined, and the resource portrait results corresponding to the container resources are generated by using the data range and the data segmentation results. According to the resource portrait results, a resource allocation plan for the time period corresponding to each segmented data set is generated, and the first difference between the time series data can be used to quantify the characteristics of the use of container resources in different time periods, so as to realize the automatic and intelligent portrait of container resources. At the same time, because the resource portrait results contain the data range corresponding to each segmented data set, it is possible to give an accurate resource configuration value based on the data range, thereby improving the accuracy of the generated resource allocation plan corresponding to each time period.

[0071] In an exemplary embodiment, Figure 2 As shown, the above step S110 may also include the following steps S202 to S206. Among them:

[0072] Step S202, obtaining the original resource request amount corresponding to each time period.

[0073] Among them, the original resource request amount can be used to represent the container's request amount for resources such as the CPU and memory, and is generally filled in based on manual experience. The original resource request amount will affect the resource allocation results of the container. When the original resource request amount is set too large, or even much higher than the actual resource utilization of the container, it is easy to cause low cluster resource utilization. When the original resource request amount is set too small, it is easy to cause insufficient resource requests for the container, affecting the stability of system operation.

[0074] For example, the server may obtain the original resource request amount corresponding to each time period in the default configuration from the local database. Alternatively, the server may also receive the original resource request amount corresponding to each time period currently input by the user through the front-end interaction component.

[0075] Step S204: Determine the configuration recommendation value for the time period corresponding to each segmented data set according to the upper limit value corresponding to each segmented data set in the resource profiling result.

[0076] Exemplarily, the server may read the upper bound value corresponding to each segmented data set from the resource profiling result, and use the upper bound value corresponding to each segmented data set as the configuration recommendation value of the container resource in the time period corresponding to each segmented data set.

[0077] Step S206: Generate a resource allocation solution corresponding to each time period according to the configuration recommendation value and the original resource request amount in each time period.

[0078] Exemplarily, the server may compare the configuration recommendation value and the original resource request amount in each time period. When the configuration recommendation value is greater than the original resource request amount, it can be determined that there is a certain amount of idle resource waste in the container. At this time, a resource allocation scheme that reduces the original resource request amount can be generated. For example, the original resource request can be reduced to a numerical level equal to the configuration recommendation value.

[0079] When the configuration recommendation value is equal to the original resource request amount, a resource allocation plan that keeps the current original resource request amount unchanged can be generated.

[0080] When the configuration recommendation value is less than the original resource request amount, it can be determined that the container is currently in a resource overuse state. At this time, the application system running the container is prone to the risk of instability, and it is urgent to increase the resource configuration amount. Therefore, a resource allocation plan that increases the original resource request amount can be generated. For example, the original resource request amount can be increased to a numerical level equal to the configuration recommendation value.

[0081] In this embodiment, the configuration recommendation value for the time period corresponding to each segmented data set is determined based on the upper limit value corresponding to each segmented data set in the resource profiling result, and the resource allocation plan corresponding to each time period is generated based on the configuration recommendation value and the original resource request amount for each time period. This enables the resource allocation plan to meet the container resource usage requirements in different time periods, avoid idle resource waste, or insufficient resources, thereby improving the accuracy of generating resource allocation plans.

[0082] In an exemplary embodiment, the above step S206 may also be implemented in the following manner:

[0083] Determine the second difference between the configuration recommendation value and the original resource request amount in each time period; generate a resource allocation plan corresponding to each time period according to the original resource request amount in each time period and the configuration adjustment level matching the second difference in each time period.

[0084] Exemplarily, the server may perform calculations on the configuration recommendation value and the original resource request amount in each time period, for example, subtracting or dividing the configuration recommendation value from the original resource request amount, thereby obtaining a second degree of difference between the configuration recommendation value and the original resource request amount in each time period.

[0085] The server may pre-store configuration adjustment levels matching different second differences. The original resource request amount is adjusted according to the configuration adjustment level matching the second difference in each time period, thereby generating a resource allocation scheme corresponding to each time period.

[0086] Optionally, in some implementations, the second difference may be calculated using the following formula:

[0087] ,

[0088] in, can represent the second degree of difference, Can indicate configuration recommended values, It can represent the original resource request amount.

[0089] When the configuration recommendation value is greater than the original resource request, the second difference calculated by the above formula is a positive number. At this time, if the second difference is larger, it means that the resource overuse of the current container is more serious, and the resource request of the container needs to be increased for upgrading. Among them, the configuration adjustment levels matching different second differences can refer to the following examples:

[0090] .

[0091] That is, when the second difference is in the range of 0 to 0.2, the configuration adjustment level that matches the second difference can be upgrade level 1. When the second difference is in the range of 0.2 to 0.4, the configuration adjustment level that matches the second difference can be upgrade level 2. When the second difference is in the range of 0.4 to 0.6, the configuration adjustment level that matches the second difference can be upgrade level 3. When the second difference is in the range of 0.6 to 0.8, the configuration adjustment level that matches the second difference can be upgrade level 4. When the second difference is in the range of 0.8 to When the interval is , the configuration adjustment level matching the second difference can be upgrade level 5.

[0092] When the configuration recommendation value is less than the original resource request, the second difference calculated by the above formula is a negative number. At this time, if the second difference is smaller, the more idle resources the current container has, and the resource request of the container can be reduced to downgrade. The configuration adjustment levels that match different second differences can refer to the following examples:

[0093] .

[0094] That is, when the second difference is in the range of -0.2 to 0, the configuration adjustment level that matches the second difference can be downgraded to level 1. When the second difference is in the range of -0.4 to -0.2, the configuration adjustment level that matches the second difference can be downgraded to level 2. When the second difference is in the range of -0.6 to -0.4, the configuration adjustment level that matches the second difference can be downgraded to level 3. When the second difference is in the range of -0.8 to -0.6, the configuration adjustment level that matches the second difference can be downgraded to level 4. When the second difference is in the range of When the value is in the range of -0.8, the configuration adjustment level matching the second difference degree may be downgrading to level 5.

[0095] In this embodiment, by calculating the second difference between the configuration recommendation value and the original resource request amount, and using the configuration adjustment level that matches the second difference, a resource allocation plan corresponding to each time period is generated. The pre-established matching relationship can be used to quickly determine the existing configuration adjustment level that can be used, thereby improving the efficiency of generating resource allocation plans.

[0096] In an exemplary embodiment, Figure 3 As shown, a business system 300 at the application level may include multiple applications 310. Each application 310 may call a service 320 at the service level to run. A service 320 may use multiple containers 322 to obtain resources.

[0097] The above step S110 can also be implemented in the following way:

[0098] According to the resource profiling results corresponding to each application 310 in the business system 300, the resource allocation value corresponding to each application 310 in each time period is determined; according to the resource allocation value corresponding to each application 310, a resource allocation plan corresponding to the business system 300 is generated.

[0099] Exemplarily, the server can use the time series data of the container resources of each container 322 actually used by each application 310, and refer to the operations of steps S102 to S108 above to generate a resource profile result corresponding to each application 310. According to the data range of the segmented data set of the resource profile result corresponding to each application 310 in each time period, the resource allocation value of each application 310 in each time period can be determined. The specific method for determining the resource allocation value can be implemented by referring to the generation operation of the configuration recommendation value given in the above embodiment, which will not be elaborated in detail here.

[0100] Optionally, in some implementations, the server may determine the amount of container resources that the business system 300 needs to allocate to each application 310 according to the resource allocation value of each application 310 in each time period, thereby generating a resource allocation scheme corresponding to the business system 300. When the amount of container resources currently applied for by the business system 300 is insufficient to be allocated to each application 310, the container resources of the business system 300 may be upgraded so that the total amount of container resources after the upgrade can meet the resource allocation value of each application 310, thereby generating a resource allocation scheme corresponding to the business system 300 at this time.

[0101] Alternatively, in other embodiments, when the amount of container resources currently applied for by the business system 300 is much higher than the sum of the resource allocation values ​​required by each application 310, the container resources of the business system 300 can be downgraded to reduce the free container resources after the downgrade, thereby generating a resource allocation plan corresponding to the business system 300 at this time.

[0102] In this embodiment, by applying the resource allocation scheme provided by this embodiment in the business system, it is possible to combine the container resource usage characteristics of the business itself in the actual production scenario to perform resource upgrades, downgrades, and other operations, thereby improving the accuracy of generating resource allocation schemes. At the same time, since the resource allocation values ​​of each application in this embodiment are determined using the resource profile results corresponding to each application, it is possible to make full use of the characteristics of resource demand peaks or resource demand troughs of different applications in different working time periods, and determine the resource allocation values ​​of each application in stages, so that each application can use more container resources during the peak resource demand period, and can apply for fewer container resources during the trough resource demand period, thereby refining the dimension of resource management and improving the utilization rate of container resources.

[0103] In addition, as the number of services provided by enterprises continues to grow, in order to meet the needs of enterprise service development, enterprises will continue to increase their investment in cloud resources. However, in the process of increasing resource investment, there is often a lack of judgment on the rationality and necessity of how many container resources the business actually needs. This can easily lead to a continuous increase in the cost of enterprise cloud resources, thereby reducing the ratio of container resource investment to output.

[0104] By adopting the resource allocation scheme generation method for the business system provided in this embodiment, the number of cloud resources that the business system needs to purchase can be more accurately analyzed through the resource profiling results, preventing enterprises from blindly purchasing and applying for unnecessary resources, and effectively solving the problems in the above-mentioned prior art. At the same time, in an actual production environment, applying the above-mentioned resource allocation scheme generation method in a kubernetes container environment can also improve the operating stability of the container and ensure that the business system provides stable and continuous services to the outside world.

[0105] In an exemplary embodiment, Figure 4 As shown, the above step S106 may also include the following steps S402 to S406. Among them:

[0106] Step S402: determine the data centroid corresponding to each segmented data set.

[0107] Optionally, in some implementation methods, the server may determine the data centroid for each segmented data set using the following formula:

[0108] .

[0109] in, It can represent a system with m data points ( ) . Can represent segmented data sets The data centroid of the segmented data set The mean of . It can represent the i-th data point in the segmented data set.

[0110] Step S404: determining the data radius corresponding to each segmented data set according to the extreme value and the data centroid in each segmented data set.

[0111] Exemplarily, the server may compare each data point in each segmented data set with the data centroid of the segmented data set, and take the data point that is greater than the data centroid and is farthest from the data centroid among the data points greater than the data centroid as the data point maximum value, and take the data point that is less than the data centroid and is closest to the data centroid among the data points less than the data centroid as the data point minimum value. The following formula is used to calculate the maximum value, minimum value, and data centroid in each segmented data set to obtain the data radius corresponding to each segmented data set:

[0112] .

[0113] in, Can represent segmented data sets The data radius. It can represent a parameter that can be used to control the scalability of the data range of the segmented data set. The larger it is, the larger the data range of the segmented data set is. Can represent segmented data sets The data centroid. Can represent segmented data sets The minimum value of the data point. Can represent segmented data sets The maximum value of the data point.

[0114] Step S406: Generate a data range corresponding to each segmented data set by using the data centroid and data radius of each segmented data set.

[0115] Exemplarily, the server may use the following formula to perform calculations on the data centroid and data radius of each segmented data set to determine the data upper bound and data lower bound corresponding to each segmented data set:

[0116] .

[0117] in, It can represent the upper bound of the segmented data set. It can represent the lower bound of the segmented data set. Can represent the data centroid of a segmented data set. The data radius that can represent a segmented data set.

[0118] The server may use an interval range consisting of a data upper boundary value and a data lower boundary value as the data range corresponding to each segmented data set.

[0119] In this embodiment, the data centroid of each segmented data set is calculated by using the mean method, and the data radius corresponding to the segmented data set is calculated using the data point farthest from the data centroid in the segmented data set and the data centroid. The data range of the segmented data set is determined using the data centroid and the data radius. Based on the fluctuation of each data point in the same segmented data set, the data upper and lower bounds of each segmented data set can be accurately determined, thereby improving the accuracy of determining the data range.

[0120] In an exemplary embodiment, Figure 5 As shown, the above step S104 may also include the following steps S502 to S510. Among them:

[0121] Step S502, using the distance between each data point in the time series data, construct a distance sequence corresponding to the time series data.

[0122] Exemplarily, the server may store a distance determination algorithm, such as a cosine similarity algorithm, a similarity coefficient algorithm, a Euclidean distance algorithm, etc. Each data point in the time series data is converted into a corresponding two-dimensional vector to obtain a two-dimensional matrix corresponding to the time series data. The distance determination algorithm is used to perform calculations on each data point in the time series data to obtain the distance between each data point. The two-dimensional matrix of the time series data and the distance between each data point are used to construct a distance sequence corresponding to the time series data.

[0123] Optionally, in some implementations, the server may use the following formula to obtain a two-dimensional matrix corresponding to the time series data:

[0124]

[0125] Among them, X n Can represent time series data, Can represent individual data points in time series data. A two-dimensional matrix that can represent time series data. It can represent the two-dimensional vector corresponding to each data point.

[0126] Optionally, in some other implementations, the server may store a square Euclidean distance algorithm. The server may use the following square Euclidean distance formula to determine the distance between each data point:

[0127] .

[0128] Among them, distance can represent distance, and u and v can represent the two-dimensional vectors corresponding to each data point.

[0129] Using the two-dimensional matrix of time series data and the distance between each data point, we can first construct a data length of The distance sequence of:

[0130] .

[0131] in, It can represent a distance sequence. The value of each element in the distance sequence is greater than or equal to zero, and the larger the value of the element, the greater the distance between the two data points corresponding to the element. It can represent the distance from the first data point to the nth data point. It can represent the distance from the n-1th data point to the nth data point.

[0132] Optionally, in some implementations, in order to remove noise or outliers in the distance sequence, the following formula may be used to perform median processing on the distance sequence:

[0133] .

[0134] Among them, the left side of the equation It can represent the distance sequence after median processing, and can be used to participate in the subsequent operation of step S504. It can represent the original distance sequence before median processing.

[0135] Optionally, in some embodiments, in order to reduce the impact of abnormal values ​​in the distance sequence on subsequent analysis results, the server can also intercept the distance sequence into an array with an upper bound of max and a lower bound of min. That is, a fixed max value is used to forcibly replace values ​​greater than max in the distance sequence, and a fixed min value is used to forcibly replace values ​​less than min in the distance sequence. Among them, in an actual production environment, the min value can be selected as 0.01, and the max value can be selected as 100. Thereby, the numerical range of the intercepted distance sequence is within 0.01 to 100. The intercepted distance sequence can be used to participate in the subsequent calculation and processing operation of step S504.

[0136] Step S504: using a preset monotonically increasing function, convert the distance sequence into a corresponding distance evaluation matrix.

[0137] Optionally, in some implementations, the server may also convert the distance sequence first, converting the distance sequence in vector format into a corresponding distance matrix in square matrix format. In addition, the matrix elements on the diagonal of the distance matrix in square matrix format are all 0, and the remaining positions in the distance matrix are corresponding distance values. Thus, a new distance matrix as shown below is obtained:

[0138]

[0139] in, Can represent the distance matrix in square matrix format. n1 It can represent the distance from the nth data point to the first data point in the time series data. 1n It can represent the distance from the first data point to the nth data point in the time series data.

[0140] The server may store a preset monotonically increasing function, such as The following formula can be used to operate the monotonically increasing function and the distance sequence to obtain the distance evaluation matrix:

[0141]

[0142] in, It can represent the distance evaluation matrix, whose diagonal value is . Can represent distance sequences. dis' n1 It can represent the distance matrix element from the nth data point to the first data point in the time series data. dis' 1n It can represent the distance matrix element from the 1st data point to the nth data point in the time series data. When the distance matrix element is larger, it can represent that the distance between the corresponding data points is larger.

[0143] Optionally, in some embodiments, when the distance sequence used by the server to construct the distance evaluation matrix is ​​a distance sequence whose value range after truncation is within 0.01 to 100, the value range of the distance evaluation matrix obtained is .

[0144] Step S506, using the distance evaluation matrix from the starting data point of the initial traversal to the current data point of the current traversal, determine the approximate cost from the starting data point to the current data point.

[0145] Exemplarily, the server can traverse each data point in the time series data and perform the following operations: starting from the starting data point of the initial traversal in the time series data, to the distance evaluation matrix of the current data point of the current traversal (the second data point, the third data point, ..., the nth data point in sequence). Determine the number of matrix rows contained in the distance evaluation matrix from the starting data point to the current data point. Use the distance evaluation matrix from the starting data point to the current data point to sum up and obtain the corresponding sum of elements. Refer to the following formula to calculate the number of matrix rows and the sum of elements to obtain the approximate cost from the starting data point to the current data point:

[0146] .

[0147] in, It can represent the distance evaluation matrix from the starting data point start to the current data point end. It can represent the approximate cost from the starting data point start to the current data point end. The distance evaluation matrix can be expressed as The number of matrix rows. The distance evaluation matrix can be expressed as The larger the approximate cost value is, the larger the gap between the starting data point and the current data point is.

[0148] Step S508: determining a change point in the time series data according to the first difference degree of the approximate cost.

[0149] For example, the server may start from the first data point in the time series data, use the approximate cost between the first data point and the remaining data points to construct an approximate cost sequence corresponding to the first data point, and traverse the approximate cost sequence corresponding to the first data point for recursive comparison.

[0150] When the approximate cost from the first data point to the i-th data point is smaller than the approximate cost from the first data point to the remaining data points, it can be determined that the first difference between the approximate cost from the first data point to the i-th data point and the approximate cost from the first data point to the remaining data points meets the preset conditions, and the i-th data point is taken as the change point in the time series data.

[0151] Alternatively, when the approximate cost from the first data point to the i+1th data point differs greatly from the approximate cost from the first data point to the data points before the i-th data point (such as the i-1th data point, the i-2th data point, etc.), but differs less from the approximate cost from the first data point to the i-th data point, that is, the difference between the i+1th data point and the i-th data point is small, while the difference between the i+1th data point and the remaining data points before the i-th data point is large, it can be determined that the first difference between the approximate cost from the first data point to the i-th data point and the approximate cost from the first data point to the remaining data points meets the preset conditions, and the i-th data point is taken as the change point in the time series data.

[0152] Optionally, in some implementations, the server may also construct a position tag sequence corresponding to the data points that need to be calculated:

[0153] .

[0154] Among them, index can represent the position label sequence, and jump can represent the step length.

[0155] When jump=1, the following position label sequence can be obtained: At this time, all data points in the time series data must participate in the calculation.

[0156] In some actual production environments, time series data may contain a large number of data points. In order to reduce the calculation time, a jump greater than 1 can be used to select data points with the same step length for subsequent calculations. For example, when jump=10, the following position label sequence can be obtained: That is, one data point is selected every 10 data points to participate in the calculation.

[0157] The approximate cost calculated by the above step S506 and the position label sequence can be used to construct the following approximate cost sequence:

[0158]

[0159] Among them, the approximate cost from position tag 0 to position tag 200 recorded in line 40 is 12.06, and the approximate cost from position tag 200 to position tag 210 is 10.09. The approximate cost recorded in line 40 is the minimum value in the above approximate cost sequence. It can be identified that the first difference between the approximate cost corresponding to the position tag 200 recorded in line 40 and the approximate cost corresponding to the other data points meets the preset condition, and the data point corresponding to the position tag 200 can be used as the change point.

[0160] Alternatively, it can be found through comparison that the approximate cost difference between the data point corresponding to the position tag 205 and the data point corresponding to the position tag 200 is small, while the approximate cost difference between the data point corresponding to the position tag 205 and the data point before the position tag 200 is large. At this time, it can also be identified that the first difference between the approximate cost corresponding to the position tag 200 and the approximate cost corresponding to the remaining data points meets the preset condition, and the data point corresponding to the position tag 200 can be used as a change point.

[0161] Step S510, segmenting the time series data using the change points to obtain data segmentation results.

[0162] Exemplarily, the server can use change points to segment the time series data to obtain a segmented data set from the starting data point to the first change point, a segmented data set from the first change point to the next change point, and a segmented data set from the next change point to the last data point, thereby forming a data segmentation result consisting of segmented data sets.

[0163] In this embodiment, by using the distance sequence to construct a distance evaluation matrix, using the distance evaluation matrix to calculate the approximate cost, using the first difference degree of the approximate cost to determine the change point, and using the change point to segment the time series data to obtain the corresponding data segmentation results, it is possible to use the difference characteristics between the data points to divide several data points with higher similarity into the same segmented data set, and divide different data points with lower similarity into different segmented data sets, thereby improving the segmentation accuracy of the data segmentation results.

[0164] In an exemplary embodiment, Figure 6 As shown, a method for allocating container resources is also provided, including the following steps S602 to S616. Among them:

[0165] Step S602: Acquire time series data of container resources actually used.

[0166] Step S604, using the distance between each data point in the time series data, construct a distance evaluation matrix corresponding to the time series data.

[0167] Exemplarily, the server can obtain the time series data of the container resources actually used by the container from the historical monitoring data of the container. The distance determination method provided in the above embodiment is used to determine the distance between the two data points in the time series data. The distance sequence in the vector format obtained by distance construction is converted to obtain a distance matrix in the square matrix format. A monotonically increasing function is used to convert the distance matrix into a corresponding distance evaluation matrix. The specific method for generating the distance evaluation matrix can be implemented by referring to the calculation formula of the distance evaluation matrix provided in the above embodiment, which will not be elaborated in detail here.

[0168] Step S606, using the distance evaluation matrix from the starting data point of the initial traversal to the current data point of the current traversal, determine the approximate cost from the starting data point to the current data point.

[0169] Step S608, determining the change point in the time series data according to the first difference degree of the approximate cost, and segmenting the time series data using the change point to obtain a data segmentation result.

[0170] Exemplarily, the server may traverse each data point in the time series data, and sequentially perform the operation of step S606 to compare the approximate costs between the data points. According to the first difference between the approximate costs of different data points, the change point in the time series data is determined. The time series data is segmented using the change point to obtain a data segmentation result.

[0171] Optionally, in some implementations, the server may also draw Figure 7 The data segmentation results are shown. Figure 7Each area from left to right in the figure corresponds to a segmented data set. For example, the first light gray area can represent the first segmented data set of the time series data, the first dark gray area can represent the second segmented data set of the time series data, and so on. Figure 7 The horizontal axis in represents the position label corresponding to each data point in the time series data. Figure 7 The vertical axis in represents the container resource amount corresponding to each data point. Figure 7 The dotted lines in represent the data range corresponding to each segmented data set.

[0172] Step S610: Generate a data range corresponding to each segmented data set by using the data centroid and data radius of each segmented data set.

[0173] Step S612, using the data range and the data segmentation result, generate a resource portrait result corresponding to the container resource.

[0174] Exemplarily, the server can calculate the mean of the data points of each segmented data set and use the mean of the data points as the corresponding data centroid. Determine the extreme value of the data point farthest from the data centroid in each segmented data set. Using the distance between the extreme value of the data point and the data centroid and the pre-configured parameters, the data radius of each segmented data set can be calculated. Using the data centroid and the data radius, the data range corresponding to each segmented data set can be calculated. Using the data range of each segmented data set, the corresponding resource portrait result can be generated.

[0175] Step S614, determining the configuration recommendation value in the time period corresponding to each segmented data set according to the upper limit value corresponding to each segmented data set in the resource profiling result.

[0176] Step S616: Generate a resource allocation plan using a corresponding configuration adjustment level according to the second difference between the configuration recommendation value and the original resource request amount in each time period.

[0177] Exemplarily, the server may use the upper bound value corresponding to each segmented data set in the resource profiling result as the configuration recommendation value for the time period corresponding to each segmented data set. Using the second difference determination method provided in the above embodiment, the second difference between the configuration recommendation value and the original resource request amount for each time period is calculated. Based on the configuration adjustment level matching the second difference, a resource allocation plan corresponding to each time period is generated.

[0178] Optionally, in some implementations, the server may also use the original resource request amount and the data segmentation result to generate Figure 8 The resource profiling results of each application in the business system are shown as follows:

[0179] .

[0180] Wherein, point can represent the change point in the time series data. Value can represent the approximate cost corresponding to the change point. The server can use the following formula to determine the configuration recommendation value:

[0181] .

[0182] That is, the application can use the maximum upper bound value of each segment data set as the configuration recommendation value (that is, Figure 8 The value indicated by the lower horizontal line in the figure).

[0183] and Figure 8 The upper horizontal line in the figure can represent the original resource request amount of the application. Figure 8 As shown in the figure, the original resource request of the application is much larger than the actual container resources used, and there is a lot of idle container resources. At this time, a resource allocation plan can be generated to downgrade the original resource request of the business system based on the resource profiling results of the application.

[0184] In this embodiment, by utilizing the differences between time series data to realize automatic data segmentation and automatic data upper and lower bound calculation, it is possible to quantify the container resource usage in different time periods and improve the accuracy of resource portrait generation results. By automatically determining the configuration recommendation values ​​in different time periods based on the resource portrait results, and then combining the original resource request amount to determine which container resources need to be adjusted and how to adjust the resource allocation plan, the accuracy and efficiency of resource allocation plan generation can be improved. This is conducive to ensuring the stable operation of the business system. In addition, the container resource allocation plan provided in this embodiment can be applied to all containers using a unified interface, thereby improving the applicability and portability of the container resource allocation plan.

[0185] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0186] Based on the same inventive concept, the embodiment of the present application also provides a container resource allocation device for implementing the container resource allocation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the allocation device for one or more container resources provided below can refer to the limitations of the container resource allocation method above, and will not be repeated here.

[0187] In an exemplary embodiment, Fig. 9 As shown, a container resource allocation device 900 is provided, comprising: a data acquisition module 902, a data segmentation module 904, a range determination module 906, a resource profiling module 908 and a resource allocation module 910, wherein:

[0188] The data acquisition module 902 is used to acquire the time series data of the container resources actually used.

[0189] The data segmentation module 904 is used to determine the data segmentation result corresponding to the time series data according to the first difference between the time series data.

[0190] The range determination module 906 is used to determine the data range corresponding to each segmented data set in the data segmentation result.

[0191] The resource portrait module 908 is used to generate a resource portrait result corresponding to the container resource by using the data range and the data segmentation result.

[0192] The resource allocation module 910 is used to generate a resource allocation plan for a time period corresponding to each segmented data set according to the resource profiling result.

[0193] In an exemplary embodiment, the resource allocation module 910 includes: a request quantity acquisition unit, used to obtain the original resource request quantity corresponding to each time period; a recommended value determination unit, used to determine the configuration recommendation value for the time period corresponding to each segmented data set according to the upper limit value corresponding to each segmented data set in the resource portrait result; and a plan generation unit, used to generate a resource allocation plan corresponding to each time period according to the configuration recommendation value and the original resource request quantity for each time period.

[0194] In an exemplary embodiment, the solution generation unit is also used to: determine the second difference between the configuration recommendation value and the original resource request amount in each time period; and generate a resource allocation solution corresponding to each time period based on the original resource request amount in each time period and the configuration adjustment level matching the second difference in each time period.

[0195] In an exemplary embodiment, the resource allocation module 910 includes: an application profiling unit, which is used to determine the resource allocation value corresponding to each application in each time period based on the resource profiling results corresponding to each application in the business system; and a business allocation unit, which is used to generate a resource allocation plan corresponding to the business system based on the resource allocation value corresponding to each application.

[0196] In an exemplary embodiment, the range determination module 906 includes: a centroid determination unit, used to determine the data centroid corresponding to each segmented data set; a radius determination unit, used to determine the data radius corresponding to each segmented data set based on the extreme values ​​and the data centroid in each segmented data set; and a range generation unit, used to generate a data range corresponding to each segmented data set using the data centroid and data radius of each segmented data set.

[0197] In an exemplary embodiment, the data segmentation module 904 includes: a sequence construction unit, which is used to construct a distance sequence corresponding to the time series data using the distance between each data point in the time series data; a matrix construction unit, which is used to convert the distance sequence into a corresponding distance evaluation matrix using a preset monotonically increasing function; a cost determination unit, which is used to traverse each data point in the time series data and perform the following operations: using the distance evaluation matrix from the starting data point of the initial traversal to the current data point of the current traversal, determine the approximate cost from the starting data point to the current data point; a change point determination unit, which is used to determine the change point in the time series data based on the first difference degree of the approximate cost; and a result generation unit, which is used to segment the time series data using the change point to obtain a data segmentation result.

[0198] Each module in the container resource allocation device 900 can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0199] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.10As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as time series data, a first difference, data segmentation results, data ranges, resource portrait results, resource allocation plans, etc. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for allocating container resources is implemented.

[0200] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0201] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0202] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0203] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0204] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0205] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0206] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for allocating container resources, characterized in that: The method comprises: Obtain the time series data of container resources actually used; Determining a data segmentation result corresponding to the time series data according to a first difference between the time series data; Determine a data range corresponding to each segmented data set in the data segmentation result; Generate a resource portrait result corresponding to the container resource by using the data range and the data segmentation result; According to the resource profiling result, a resource allocation plan for a time period corresponding to each of the segmented data sets is generated.

2. The method according to claim 1, characterized in that Generating a resource allocation scheme for a time period corresponding to each of the segmented data sets according to the resource profiling result includes: Obtaining the original resource request amount corresponding to each of the time periods; Determine, according to the upper limit value corresponding to each of the segmented data sets in the resource profiling result, a configuration recommendation value for the time period corresponding to each of the segmented data sets; A resource allocation scheme corresponding to each of the time periods is generated according to the configuration recommendation value and the original resource request amount in each of the time periods.

3. The method according to claim 2, characterized in that Generating a resource allocation scheme corresponding to each time period according to the configuration recommendation value and the original resource request amount in each time period includes: Determine a second difference between the configuration recommendation value and the original resource request amount in each of the time periods; A resource allocation scheme corresponding to each of the time periods is generated according to the original resource request amount in each of the time periods and the configuration adjustment level matched by the second degree of difference in each of the time periods.

4. The method according to claim 1, characterized in that: Generating a resource allocation scheme for a time period corresponding to each of the segmented data sets according to the resource profiling result includes: Determine the resource allocation value corresponding to each application in each time period according to the resource profiling results corresponding to each application in the business system; A resource allocation scheme corresponding to the business system is generated according to the resource allocation values ​​corresponding to each of the applications.

5. The method according to claim 1, characterized in that The determining of the data range corresponding to each segmented data set in the data segmentation result includes: Determine the data centroid corresponding to each of the segmented data sets; Determining a data radius corresponding to each of the segmented data sets according to the extreme value in each of the segmented data sets and the data centroid; A data range corresponding to each of the segmented data sets is generated by using the data centroid and the data radius of each of the segmented data sets.

6. The method according to claim 1, characterized in that The step of determining a data segmentation result corresponding to the time series data according to the first difference between the time series data includes: Using the distance between each data point in the time series data, construct a distance sequence corresponding to the time series data; Using a preset monotonically increasing function, the distance sequence is converted into a corresponding distance evaluation matrix; Traversing each of the data points in the time series data, and performing the following operations: determining an approximate cost from the starting data point to the current data point using a distance evaluation matrix from a starting data point of an initial traversal to a current data point of a current traversal; Determining a change point in the time series data according to a first difference degree of the approximate cost; The time series data is segmented using the change points to obtain the data segmentation result.

7. A container resource allocation device, characterized in that: The device comprises: The data acquisition module is used to obtain the time series data of the container resources actually used; A data segmentation module, configured to determine a data segmentation result corresponding to the time series data according to a first difference between the time series data; A range determination module, used to determine the data range corresponding to each segmented data set in the data segmentation result; A resource portrait module, used to generate a resource portrait result corresponding to the container resource by using the data range and the data segmentation result; The resource allocation module is used to generate a resource allocation plan for a time period corresponding to each of the segmented data sets based on the resource profiling results.

8. The device according to claim 7, characterized in that The resource allocation module comprises: A request quantity acquisition unit, used to acquire the original resource request quantity corresponding to each of the time periods; A recommended value determination unit, configured to determine a configuration recommended value for a time period corresponding to each of the segmented data sets according to an upper limit value corresponding to each of the segmented data sets in the resource profiling result; A solution generating unit is used to generate a resource allocation solution corresponding to each of the time periods according to the configuration recommendation value and the original resource request amount in each of the time periods.

9. The device according to claim 8, characterized in that The scheme generating unit is further used for: Determine a second difference between the configuration recommendation value and the original resource request amount in each of the time periods; A resource allocation scheme corresponding to each of the time periods is generated according to the original resource request amount in each of the time periods and the configuration adjustment level matched by the second degree of difference in each of the time periods.

10. The device according to claim 7, characterized in that The resource allocation module comprises: The application profiling unit is used to determine the resource allocation value corresponding to each application in each time period according to the resource profiling results corresponding to each application in the business system; The business allocation unit is used to generate a resource allocation plan corresponding to the business system according to the resource allocation value corresponding to each of the applications.

11. The device according to claim 7, characterized in that The scope determination module comprises: A centroid determination unit, used to determine the data centroid corresponding to each of the segmented data sets; A radius determination unit, configured to determine a data radius corresponding to each of the segmented data sets according to an extreme value in each of the segmented data sets and the data centroid; The range generating unit is used to generate a data range corresponding to each of the segmented data sets by using the data centroid and the data radius of each of the segmented data sets.

12. The device according to claim 7, characterized in that The data segmentation module comprises: A sequence construction unit, configured to construct a distance sequence corresponding to the time series data by using the distance between each data point in the time series data; A matrix construction unit, used to convert the distance sequence into a corresponding distance evaluation matrix using a preset monotonically increasing function; A cost determination unit is used to traverse each of the data points in the time series data and perform the following operations: determine the approximate cost from the starting data point to the current data point using a distance evaluation matrix from a starting data point of the initial traversal to a current data point of the current traversal; a change point determination unit, configured to determine a change point in the time series data according to a first difference degree of the approximate cost; The result generating unit is used to segment the time series data using the change points to obtain the data segmentation result.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.