Cluster resource processing method and device and electronic equipment

By acquiring performance index data of the target resource group and using a time-series prediction model to determine the cluster resource demand, automatic scaling up and down processing is performed, solving the problem of cluster resource waste or insufficiency, realizing automatic elastic scaling up and down of multiple clusters, and improving resource utilization efficiency.

CN120803684APending Publication Date: 2025-10-17ALIBABA CLOUD COMPUTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410431798.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-10
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

In the existing technology, manually scaling the cluster resources of the database resource group based on the cluster load has a lag, resulting in waste or insufficient cluster resources, and is less flexible and unable to adapt to real-time changes in user resource requirements.

Method used

By acquiring the performance index data of the target resource group, using the target time series prediction model to perform time series prediction, and judging whether scaling up or down is needed based on the predicted performance index data and time window, the cluster resources are automatically scaled up or down to achieve automatic elastic scaling up and down of multiple clusters.

Benefits of technology

By predicting cluster load changes in advance, query tasks can be prevented from being damaged, resource idleness and waste can be reduced, and the flexibility and accuracy of cluster resource processing can be improved, thus solving the problem of cluster resource waste or insufficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803684A_ABST
    Figure CN120803684A_ABST
Patent Text Reader

Abstract

The invention discloses a cluster resource processing method and device and electronic equipment. The method relates to the field of cloud computing and comprises the steps that target performance index data of a target resource group is acquired, and the target resource group is composed of at least one cluster resource; if prediction performance index data exists in the target performance index data, whether the target resource group needs capacity expansion and shrinkage processing or not is judged according to the prediction performance index data and a target time window, a target judgment result is obtained, and the prediction performance index data is obtained by conducting time sequence prediction through a target time sequence prediction model in advance; and if the target judgment result is that the target resource group needs capacity expansion and shrinkage processing, carrying out capacity expansion and shrinkage processing on cluster resources of the target resource group. According to the method and the device, the technical problem of waste or insufficiency of the cluster resources caused by hysteresis when the capacity expansion and shrinkage processing is manually performed on the cluster resources of the database resource group according to the cluster load in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of cloud computing, in particular to a cluster resource processing method and device and electronic equipment. BACKGROUND

[0002] Generally, a single resource group of a cloud-native data warehouse has a single cluster to execute user queries, when user queries are submitted to the resource group, these queries share all computing resources of the resource group and start executing the queries. If the query load of the resource group continues to grow until the current resource group computing resources cannot meet the demand, the size of the resource group needs to be adjusted to meet the query demand, and when the query load drops, the size of all resource groups also needs to be adjusted to reduce resource waste.

[0003] At present, the related art mainly manually expands or shrinks the cluster resources of the resource group according to the cluster load, which has a lag and can cause cluster resource waste or insufficient cluster resources, and has poor flexibility and cannot adapt to real-time changes in user resource demand.

[0004] In view of the above problems, no effective solution has been proposed so far. SUMMARY

[0005] The embodiments of the present application provide a cluster resource processing method and device and electronic equipment to at least solve the technical problem that the related art manually expands or shrinks the cluster resources of the database resource group according to the cluster load, which has a lag and can cause cluster resource waste or insufficient cluster resources.

[0006] According to an aspect of an embodiment of the present application, a cluster resource processing method is provided, including: obtaining target performance indicator data of a target resource group, wherein the target resource group is composed of at least one cluster resource, and the target performance indicator data is used to represent the use of the cluster resources of the target resource group; if there is predicted performance indicator data in the target performance indicator data, determining whether the target resource group needs to be expanded or shrunk according to the predicted performance indicator data and a target time window to obtain a target determination result, wherein the predicted performance indicator data is obtained by time series prediction through a target time series prediction model in advance, and the target time window is a continuous time period composed of a start time point and an end time point; if the target determination result is that the target resource group needs to be expanded or shrunk, expanding or shrinking the cluster resources of the target resource group.

[0007] Further, the target resource group is determined to need the scaling processing according to the predicted performance index data and the target time window, to obtain a target determination result, including: calculating an initial cluster resource quantity set corresponding to a predicted time period of the predicted performance index data according to the predicted performance index data, wherein the predicted time period is divided into multiple time intervals, and each time interval corresponds to an initial cluster resource quantity; and determining whether the target resource group needs the scaling processing according to the initial cluster resource quantity set and the target time window, to obtain the target determination result.

[0008] Further, the target time window is one of a first time window and a second time window, a time length corresponding to the first time window is less than a time length corresponding to the second time window, and the target resource group is determined to need the scaling processing according to the initial cluster resource quantity set and the target time window, to obtain the target determination result, including: obtaining a current cluster resource quantity of the target resource group; determining whether the target resource group needs the scaling processing according to the current cluster resource quantity of the target resource group, the initial cluster resource quantity set and the first time window, to obtain a first determination result; if the first determination result is that the target resource group needs the scaling processing, the first determination result is taken as the target determination result; if the first determination result is that the target resource group does not need the scaling processing, determining whether the target resource group needs the scaling processing according to the current cluster resource quantity of the target resource group, the initial cluster resource quantity set and the second time window, to obtain a second determination result; and determining the target determination result according to the second determination result.

[0009] Further, the target resource group is determined to need the scaling processing according to the predicted performance index data and the target time window, to obtain a target determination result, including: calculating an initial cluster resource quantity set corresponding to a predicted time period of the predicted performance index data according to the predicted performance index data, wherein the predicted time period is divided into multiple time intervals, and each time interval corresponds to an initial cluster resource quantity; and determining whether the target resource group needs the scaling processing according to the initial cluster resource quantity set and the target time window, to obtain the target determination result.

[0010] Furthermore, whether the target resource group needs to be expanded is judged based on the current number of cluster resources of the target resource group, the number of multiple cluster resources in the current first time window, and the number of multiple cluster resources in multiple subsequent first time windows, and obtaining a first judgment result includes: determining the first number from the multiple numbers of cluster resources in the current first time window and the multiple numbers of cluster resources in the subsequent first time windows in multiple subsequent first time windows, respectively, to obtain the first number corresponding to the current first time window and the first number corresponding to the subsequent first time windows in multiple subsequent first time windows; comparing the current number of cluster resources of the target resource group with the first number corresponding to the current first time window to obtain a first comparison result, and comparing the current number of cluster resources of the target resource group with the subsequent first number in multiple subsequent first time windows, respectively. A first quantity corresponding to the time window is compared to obtain multiple second comparison results; if the first comparison result indicates that the current number of cluster resources of the target resource group is less than the first quantity corresponding to the current first time window, and multiple second comparison results all indicate that the current number of cluster resources of the target resource group is less than the first quantity corresponding to the subsequent first time windows in multiple subsequent first time windows, then the target resource group needs to be expanded as the first judgment result; if the first comparison result indicates that the current number of cluster resources of the target resource group is greater than or equal to the first quantity corresponding to the current first time window, or there is a second comparison result among the multiple second comparison results indicating that the current number of cluster resources of the target resource group is greater than or equal to the first quantity corresponding to the subsequent first time windows in multiple subsequent first time windows, then the target resource group does not need to be expanded as the first judgment result.

[0011] Furthermore, whether the target resource group needs to be scaled down is judged based on the current cluster resource quantity of the target resource group, the initial cluster resource quantity set and the second time window, and the second judgment result is obtained, including: obtaining the second historical cluster resource quantity set, and forming a second cluster resource quantity set based on the second historical cluster resource quantity set and the initial cluster resource quantity set; determining multiple cluster resource quantities within the current second time window and multiple cluster resource quantities within multiple subsequent second time windows of the current second time window from the second cluster resource quantity set, wherein the multiple subsequent second time windows are obtained by updating the current second time window, and the number of multiple subsequent second time windows is greater than the number of multiple subsequent first time windows; judging whether the target resource group needs to be scaled down based on the current cluster resource quantity of the target resource group, the multiple cluster resource quantities within the current second time window, and the multiple cluster resource quantities within multiple subsequent second time windows, and obtaining the second judgment result.

[0012] Further, the method further includes: determining a second quantity from the plurality of cluster resource quantities in the current second time window and the plurality of cluster resource quantities in the subsequent second time windows in the plurality of subsequent second time windows, obtaining the second quantity corresponding to the current second time window and the second quantity corresponding to the subsequent second time window in the plurality of subsequent second time windows, wherein the second quantity is greater than the first quantity; comparing the current cluster resource quantity of the target resource group with the second quantity corresponding to the current second time window to obtain a third comparison result, and comparing the current cluster resource quantity of the target resource group with the second quantity corresponding to the subsequent second time window in the plurality of subsequent second time windows to obtain a plurality of fourth comparison results; if the third comparison result indicates that the current cluster resource quantity of the target resource group is greater than the second quantity corresponding to the current second time window, and the plurality of fourth comparison results all indicate that the current cluster resource quantity of the target resource group is greater than the second quantity corresponding to the subsequent second time window in the plurality of subsequent second time windows, the target resource group needs to be scaled down as the second determination result; if the third comparison result indicates that the current cluster resource quantity of the target resource group is less than or equal to the second quantity corresponding to the current second time window, or there is a fourth comparison result in the plurality of fourth comparison results indicating that the current cluster resource quantity of the target resource group is less than or equal to the second quantity corresponding to the subsequent second time window in the plurality of subsequent second time windows, the target resource group does not need to be scaled down as the second determination result.

[0013] Further, the target time series prediction model is generated by: before the start of the prediction period, obtaining target time series data of the target resource group, wherein the target time series data is composed of performance indicator data of a plurality of historical time points; and retraining the initial time series prediction model according to the target time series data to obtain the target time series prediction model.

[0014] Further, after obtaining the target time series prediction model, the method further includes: when the prediction period starts, obtaining performance indicator data in a period time period corresponding to the prediction period; and performing time series prediction calculation based on the performance indicator data in the period time period by using the target time series prediction model to obtain predicted performance indicator data, wherein the predicted performance indicator data includes predicted values of performance indicator data of a plurality of future time points.

[0015] Further, if the target judgment result is that the target resource group needs to be scaled, scaling the cluster resources of the target resource group includes: if the target judgment result is that the target resource group needs to be scaled up, obtaining target index information of the target component, and determining whether to scale up the cluster resources of the target resource group according to the target index information, wherein the target index information is used to indicate whether the target component is in a usable state; and if the target judgment result is that the target resource group needs to be scaled down, scaling the cluster resources of the target resource group according to the target second number to reduce the current cluster quantity of the target resource group.

[0016] Further, determining whether to scale up the cluster resources of the target resource group according to the target index information includes: if the target index information indicates that the target component is in a usable state, scaling up the cluster resources of the target resource group according to the target first number to increase the current cluster quantity of the target resource group; and if the target index information indicates that the target component is not in a usable state, not scaling up the cluster resources of the target resource group.

[0017] Further, after obtaining the target performance index data of the target resource group, the method further includes: if the predicted performance index data does not exist in the target performance index data, or the target judgment result is that the target resource group does not need to be scaled, determining whether the target resource group needs to be scaled according to real-time performance index data in the target performance index data and the target time window to obtain a third judgment result.

[0018] According to another aspect of the embodiments of the present application, a cluster resource processing system is also provided, which includes: an index collection module, configured to collect index data of target performance indexes of cluster resources of a target resource group in real time, and store the index data of the target performance indexes; a time series prediction module, configured to retrain an initial time series prediction model according to target time series data obtained from the index collection module before a prediction period starts, to obtain a target time series prediction model, perform time series prediction calculation through the target time series prediction model when the prediction period starts, to obtain predicted performance index data, and transmit the predicted performance index data to the index collection module, wherein the target time series data is composed of performance index data of multiple historical time points; a decision module, configured to determine whether the target resource group needs to be scaled according to target performance index data obtained from the index collection module and a target time window, to obtain a target judgment result, and transmit the target judgment result to a controller, wherein the target performance index data includes at least one of the predicted performance index data and real-time performance index data; and the controller, configured to determine a target cluster resource quantity based on the target judgment result, and increase or decrease the cluster resources of the target resource group according to the target cluster resource quantity.

[0019] According to another aspect of the embodiments of the present application, a processing apparatus for cluster resources is further provided, comprising: an obtaining unit, configured to obtain target performance index data of a target resource group, wherein the target resource group is composed of at least one cluster resource, and the target performance index data is used to represent the usage of the cluster resources of the target resource group; a judging unit, configured to, if there is predicted performance index data in the target performance index data, judge whether the target resource group needs to be scaled according to the predicted performance index data and a target time window to obtain a target judgment result, wherein the predicted performance index data is obtained by performing time series prediction on the target time series prediction model in advance, and the target time window is a continuous time period composed of a start time point and an end time point; and a processing unit, configured to, if the target judgment result is that the target resource group needs to be scaled, perform scaling processing on the cluster resources of the target resource group.

[0020] Further, the judging unit comprises: a calculating sub-unit, configured to calculate a set of initial cluster resource quantities corresponding to a predicted time period of the predicted performance index data according to the predicted performance index data, wherein the predicted time period is divided into a plurality of time intervals, and each time interval corresponds to an initial cluster resource quantity; and a judging sub-unit, configured to judge whether the target resource group needs to be scaled according to the set of initial cluster resource quantities and the target time window to obtain the target judgment result.

[0021] Further, the target time window is one of a first time window and a second time window, the time length corresponding to the first time window is less than the time length corresponding to the second time window, and the judging sub-unit comprises: an obtaining module, configured to obtain the current cluster resource quantity of the target resource group; a first judging module, configured to judge whether the target resource group needs to be scaled according to the current cluster resource quantity of the target resource group, the set of initial cluster resource quantities and the first time window to obtain a first judgment result; a first determining module, configured to, if the first judgment result is that the target resource group needs to be scaled, take the first judgment result as the target judgment result; a second judging module, configured to, if the first judgment result is that the target resource group does not need to be scaled, judge whether the target resource group needs to be scaled according to the current cluster resource quantity of the target resource group, the set of initial cluster resource quantities and the second time window to obtain a second judgment result; and a second determining module, configured to determine the target judgment result according to the second judgment result.

[0022] Further, the first determining module comprises: a first obtaining sub-module, configured to obtain a first historical cluster resource quantity set, and form a first cluster resource quantity set according to the first historical cluster resource quantity set and the initial cluster resource quantity set; a first determining sub-module, configured to determine a plurality of cluster resource quantities in the current first time window and a plurality of cluster resource quantities in a plurality of subsequent first time windows from the first cluster resource quantity set, wherein the plurality of subsequent first time windows are obtained by updating the current first time window; and a first determining sub-module, configured to determine whether the target resource group needs to be expanded according to the current cluster resource quantity of the target resource group, the plurality of cluster resource quantities in the current first time window, and the plurality of cluster resource quantities in the plurality of subsequent first time windows, to obtain a first determination result.

[0023] Further, the first determining sub-module comprises: a first determining sub-sub-module, configured to determine a first quantity from the plurality of cluster resource quantities in the current first time window and the plurality of cluster resource quantities in the subsequent first time window of the plurality of subsequent first time windows, respectively, to obtain the first quantity corresponding to the current first time window and the first quantity corresponding to the subsequent first time window of the plurality of subsequent first time windows; a first comparing sub-sub-module, configured to compare the current cluster resource quantity of the target resource group with the first quantity corresponding to the current first time window to obtain a first comparison result, and compare the current cluster resource quantity of the target resource group with the first quantity corresponding to the subsequent first time window of the plurality of subsequent first time windows to obtain a plurality of second comparison results; a second determining sub-sub-module, configured to, if the first comparison result indicates that the current cluster resource quantity of the target resource group is less than the first quantity corresponding to the current first time window, and the plurality of second comparison results all indicate that the current cluster resource quantity of the target resource group is less than the first quantity corresponding to the subsequent first time window of the plurality of subsequent first time windows, determine that the target resource group needs to be expanded as the first determination result; and a third determining sub-sub-module, configured to, if the first comparison result indicates that the current cluster resource quantity of the target resource group is greater than or equal to the first quantity corresponding to the current first time window, or there is a second comparison result in the plurality of second comparison results indicating that the current cluster resource quantity of the target resource group is greater than or equal to the first quantity corresponding to the subsequent first time window of the plurality of subsequent first time windows, determine that the target resource group does not need to be expanded as the first determination result.

[0024] Further, the second determining module comprises: a second obtaining sub-module, configured to obtain a second historical cluster resource quantity set, and form a second cluster resource quantity set according to the second historical cluster resource quantity set and the initial cluster resource quantity set; a second determining sub-module, configured to determine a plurality of cluster resource quantities in the current second time window and a plurality of cluster resource quantities in a plurality of subsequent second time windows of the current second time window from the second cluster resource quantity set, wherein the plurality of subsequent second time windows are obtained by updating the current second time window, and the number of the plurality of subsequent second time windows is greater than the number of the plurality of subsequent first time windows; and a second determining sub-module, configured to determine whether the target resource group needs to be scaled down according to the current cluster resource quantity of the target resource group, the plurality of cluster resource quantities in the current second time window, and the plurality of cluster resource quantities in the plurality of subsequent second time windows, to obtain a second determining result.

[0025] Further, the second determining sub-module comprises: a fourth determining sub-sub-module, configured to determine a second quantity from the plurality of cluster resource quantities in the current second time window and the plurality of cluster resource quantities in the subsequent second time window of the plurality of subsequent second time windows respectively, to obtain the second quantity corresponding to the current second time window and the second quantity corresponding to the subsequent second time window of the plurality of subsequent second time windows, wherein the second quantity is greater than the first quantity; a second comparing sub-sub-module, configured to compare the current cluster resource quantity of the target resource group with the second quantity corresponding to the current second time window to obtain a third comparison result, and compare the current cluster resource quantity of the target resource group with the second quantity corresponding to the subsequent second time window of the plurality of subsequent second time windows respectively to obtain a plurality of fourth comparison results; a fifth determining sub-sub-module, configured to, if the third comparison result represents that the current cluster resource quantity of the target resource group is greater than the second quantity corresponding to the current second time window, and the plurality of fourth comparison results all represent that the current cluster resource quantity of the target resource group is greater than the second quantity corresponding to the subsequent second time window of the plurality of subsequent second time windows, determine that the target resource group needs to be scaled down as the second determining result; and a sixth determining sub-sub-module, configured to, if the third comparison result represents that the current cluster resource quantity of the target resource group is less than or equal to the second quantity corresponding to the current second time window, or there is a fourth comparison result in the plurality of fourth comparison results representing that the current cluster resource quantity of the target resource group is less than or equal to the second quantity corresponding to the subsequent second time window of the plurality of subsequent second time windows, determine that the target resource group does not need to be scaled down as the second determining result.

[0026] Furthermore, the processing device for cluster resources also includes the following units, which are used to generate a target time series prediction model in the following manner: a first acquisition unit, which is used to obtain target time series data of the target resource group before the start of the prediction cycle, wherein the target time series data is composed of performance indicator data of multiple historical time points; a training unit, which is used to retrain the initial time series prediction model based on the target time series data to obtain a target time series prediction model.

[0027] Furthermore, the processing device for cluster resources also includes: a second acquisition unit, which is used to obtain the performance indicator data within the periodic time period corresponding to the prediction period when the prediction period begins after obtaining the target time series prediction model; a calculation unit, which is used to perform time series prediction calculation based on the performance indicator data within the periodic time period through the target time series prediction model to obtain predicted performance indicator data, wherein the predicted performance indicator data includes predicted values ​​of performance indicator data at multiple time points in the future.

[0028] Furthermore, the processing unit includes: a determination sub-unit, which is used to obtain target indicator information of the target component if the target judgment result is that the target resource group needs to be expanded, and determine whether to expand the cluster resources of the target resource group based on the target indicator information, wherein the target indicator information is used to characterize whether the target component is in an available state; and a first processing sub-unit, which is used to shrink the cluster resources of the target resource group according to the target second quantity if the target judgment result is that the target resource group needs to be shrunk, so as to reduce the current cluster quantity of the target resource group.

[0029] Furthermore, the determination sub-unit includes: a first processing module, which is used to expand the cluster resources of the target resource group according to the target first quantity to increase the current cluster quantity of the target resource group if the target indicator information indicates that the target component is in an available state; and a second processing module, which is used to not expand the cluster resources of the target resource group if the target indicator information indicates that the target component is not in an available state.

[0030] Furthermore, the processing device for cluster resources also includes: a first judgment unit, which is used to, after obtaining the target performance indicator data of the target resource group, if there is no predicted performance indicator data in the target performance indicator data, or the target judgment result is that the target resource group does not need expansion or contraction processing, then judge whether the target resource group needs expansion or contraction processing based on the real-time performance indicator data and the target time window in the target performance indicator data to obtain a third judgment result.

[0031] According to another aspect of an embodiment of the present invention, an electronic device is provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes any one of the above cluster resource processing methods when running.

[0032] According to another aspect of the embodiments of the present application, a computer readable storage medium is also provided, which stores a program, wherein the program controls a device where the storage medium is located to perform the processing method of the cluster resource of any one of the above when the program is executed.

[0033] According to another aspect of the embodiments of the present application, a computer program product is also provided, which comprises a computer program, and the computer program implements the processing method of the cluster resource of any one of the above when executed by a processor.

[0034] In the embodiments of the present application, the target performance index data of the target resource group is acquired, wherein the target resource group is composed of at least one cluster resource, and the target performance index data is used to represent the usage of the cluster resource of the target resource group; if there is predicted performance index data in the target performance index data, it is judged whether the target resource group needs to be scaled according to the predicted performance index data and the target time window, and a target judgment result is obtained, wherein the predicted performance index data is obtained by time series prediction through a target time series prediction model in advance, and the target time window is a continuous time period composed of a start time point and an end time point; if the target judgment result is that the target resource group needs to be scaled, the cluster resource of the target resource group is scaled in the mode of automatic elastic scaling of multiple clusters based on time series prediction, that is, the cluster load change can be predicted in advance, the cluster can be scaled in advance before the cluster load rises, the resources can be prepared before the cluster load peak arrives, the query task can be effectively prevented from being damaged, the cluster can be scaled in advance before the cluster load drops, and the idle and waste of resources can be reduced. In addition, the use of the time window can guarantee the stability of the scaling decision, effectively avoid temporary fluctuations leading to incorrect scaling decisions, improve the flexibility and accuracy of the cluster resource processing, and achieve the purpose of automatic elastic scaling of multiple clusters. Thus, the technical effect of reducing the waste or shortage of cluster resources is achieved, and the technical problem that the cluster resource of the database resource group is manually scaled according to the cluster load in the related art, which has a lag and leads to the waste or shortage of cluster resources, is solved. BRIEF DESCRIPTION OF DRAWINGS

[0035] The accompanying drawings, which are included to provide a further understanding of the present application and are incorporated in and constitute a part of this application, illustrate embodiments of the present application and serve to explain the present application. In the drawings:

[0036] Figure 1 FIG. 1 is a schematic diagram of a computer terminal according to an embodiment of the present application;

[0037] Figure 2 FIG. 4 is a flowchart of the processing method of the cluster resource according to the embodiment one of the present application;

[0038] Figure 3 is a schematic diagram of an optional cluster resource processing architecture according to Embodiment One of the present application;

[0039] Figure 4 is a schematic diagram of an optional time window judgment process according to Embodiment One of the present application;

[0040] Figure 5 is a schematic diagram of a cluster resource processing system according to Embodiment Two of the present application;

[0041] Figure 6 is a schematic diagram of a cluster resource processing apparatus according to Embodiment Three of the present application;

[0042] Figure 7 is a structural block diagram of an electronic device according to Embodiment Four of the present application. DETAILED DESCRIPTION

[0043] In order to make the personnel in the technical field better understand the present application scheme, the technical scheme in the present application embodiment will be described clearly and completely below in combination with the drawings in the present application embodiment. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor should be within the scope of protection of the present application.

[0044] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0045] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards in relevant regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0046] First, some of the nouns or terms appearing in the description of the embodiments of the present application are applicable to the following explanations:

[0047] Cluster: a collection of computing resources, database queries executed on a cluster can use all resources in the entire cluster. Resources between different clusters are isolated from each other.

[0048] Resource group: a collection of clusters, a unit of user resource usage control of a cloud-native data warehouse.

[0049] Multi-cluster strategy: increase or decrease the number of clusters to dynamically control the total amount of resources.

[0050] Automatic multi-cluster scaling strategy: an algorithm combining proactive scaling based on time series prediction and passive scaling based on real-time indicator monitoring.

[0051] Time series prediction: based on historical indicator data at multiple time points, predict the possible value of the corresponding indicator at the subsequent time point.

[0052] Scaling: increase or decrease the number of clusters to provide a resource amount matching the demand.

[0053] Embodiment 1

[0054] According to the embodiments of the present application, a cluster resource processing method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order.

[0055] The method provided by the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a cluster resource processing method is shown. As shown in Figure 1 The computer terminal (or mobile device) 10 can include a processor set 102 (the processor set 102 can include but is not limited to a processing device such as a microcontroller unit (MCU) or a field programmable gate array (FPGA), and the processor set 102 can include a processor set, Figure 1102a, 102b, ..., 102n are used to illustrate), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a Universal Serial Bus (USB) port (which can be included as one of the ports of the BUS), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0056] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be fully or partially integrated into any of the other components of the computer terminal 10 (or mobile device).

[0057] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the cluster resource processing method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizes the above-mentioned cluster resource processing method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0058] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0059] The display can be a touch screen liquid crystal display that enables a user to interact with the user interface of the computer terminal 10 (or mobile device).

[0060] Generally, a single resource group of a cloud-native data warehouse has a single cluster to execute user queries, when a user query is submitted to the resource group, the queries share all computing resources of the resource group and start to execute the queries. If the query load of the resource group continuously grows until the current resource group computing resources cannot meet the demand, the size of the resource group needs to be adjusted to meet the query demand, and when the query load drops, the size of all resource groups also needs to be adjusted to reduce resource waste.

[0061] At present, the related art mainly manually expands or shrinks the cluster resources of the resource group according to the cluster load, which has a lag and can cause cluster resource waste or insufficient cluster resources, and has poor flexibility and cannot adapt to real-time changes in user resource demand. For example, in order to ensure resource demand during a load peak period, a user often needs to maintain a high resource group size, but this will cause great resource waste during a load trough.

[0062] Under the above technical background, the present application provides a cluster resource processing method as shown in Figure 2 The flowchart of the cluster resource processing method provided by an embodiment of the present application is shown in Figure 2 The method comprises the following steps:

[0063] In step S201, target performance indicator data of a target resource group is obtained, wherein the target resource group is composed of at least one cluster resource, and the target performance indicator data is used to represent the usage of the cluster resource of the target resource group.

[0064] Optionally, the embodiments of the present application can be applied to a cloud-native data warehouse to automatically adjust the number of cluster resources under a resource group and realize automatic elasticity of the total amount of resources of the resource group. For example, a cluster resource processing system of a cloud-native data warehouse obtains target performance indicator data of a target resource group, wherein the target resource group can be a resource group providing resources for the cloud-native data warehouse, and the target performance indicator data can be central processing unit (CPU) utilization, memory utilization, etc.

[0065] In step S202, if there is predicted performance indicator data in the target performance indicator data, whether the target resource group needs to be expanded or shrunk is judged according to the predicted performance indicator data and a target time window to obtain a target judgment result, wherein the predicted performance indicator data is obtained by time series prediction through a target time series prediction model in advance, and the target time window is a continuous time period composed of a start time point and an end time point.

[0066] In step S203, if the target judgment result is that the target resource group needs to be scaled, the cluster resources of the target resource group are scaled.

[0067] In order to effectively avoid the query task from being damaged, the target time sequence prediction model can be used to predict the cluster load change according to the time sequence, and obtain predicted performance index data (such as predicted query queue number, predicted cluster average load, etc.). Therefore, in the case that the target performance index data includes the predicted performance index data, the predicted performance index data and the target time window can be used to determine whether the target resource group needs to be scaled, and obtain a target judgment result. The target time window is a continuous time period composed of a start time point and an end time point. Since the query task load may have occasional peaks and fluctuations, the increase or decline of the load at some time points cannot represent the need for scaling. Therefore, in the embodiments of the present application, a stable time window (i.e., the target time window) is used as the basis for scaling decision. If the target judgment result is that the target resource group needs to be scaled, the cluster resources of the target resource group are scaled. For example, the cluster resources of the target resource group are scaled to increase the current cluster number of the target resource group, or the cluster resources of the target resource group are scaled to reduce the current cluster number of the target resource group.

[0068] In the present scheme, the multi-cluster automatic elastic scaling is realized based on time sequence prediction, that is, the cluster load change can be predicted in advance, the cluster can be scaled in advance before the cluster load increases, so as to prepare resources before the cluster load peak, effectively avoiding the query task from being damaged, the cluster can be scaled in advance before the cluster load drops, so as to reduce resource idling and waste. In addition, the use of the time window can ensure the stability of the scaling decision, effectively avoid temporary fluctuations leading to false scaling decision, improve the flexibility and accuracy of the cluster resource processing, and achieve the purpose of multi-cluster automatic elastic scaling, thereby realizing the technical effect of reducing cluster resource waste or deficiency, and further solving the technical problem that the manual scaling of the cluster resources of the database resource group according to the cluster load in the related art has a lag, resulting in cluster resource waste or deficiency.

[0069] In order to determine whether the target resource group needs to be scaled, in the cluster resource processing method provided in Embodiment One of the present application, whether the target resource group needs to be scaled is determined according to the predicted performance index data and the target time window, and a target determination result is obtained, including: calculating a set of initial cluster resource quantities required in a predicted time period corresponding to the predicted performance index data according to the predicted performance index data, wherein the predicted time period is divided into multiple time intervals, and each time interval corresponds to an initial cluster resource quantity; determining whether the target resource group needs to be scaled according to the set of initial cluster resource quantities and the target time window, and obtaining the target determination result.

[0070] Optionally, the set of initial cluster resource quantities required in the predicted time period corresponding to the predicted performance index data can be calculated according to the predicted performance index data, wherein the predicted time period can be determined according to the cluster startup time, for example, it takes 20 seconds to start a cluster, so the predicted time period can be 20 seconds, and the time interval can be 5 seconds, i.e. there are 4 time intervals, and each time interval corresponds to an initial cluster resource quantity. For example, according to the predicted performance index data, it is calculated that the predicted recommended cluster quantity (i.e. the initial cluster resource quantity) corresponding to 0 to 5 seconds is 3, the predicted recommended cluster quantity corresponding to 5 to 10 seconds is 4, the predicted recommended cluster quantity corresponding to 10 to 15 seconds is 5, and the predicted recommended cluster quantity corresponding to 15 to 20 seconds is 6, so the set of initial cluster resource quantities is (3, 4, 5, 6).

[0071] Optionally, whether the target resource group needs to be scaled can be determined according to the set of initial cluster resource quantities and the target time window, and a target determination result is obtained. In order to determine whether the target resource group needs to be scaled, in the cluster resource processing method provided in Embodiment One of the present application, the target time window is one of the following: a first time window and a second time window, the time length corresponding to the first time window is less than the time length corresponding to the second time window, and whether the target resource group needs to be scaled is determined according to the set of initial cluster resource quantities and the target time window, and a target determination result is obtained, including: obtaining the current cluster resource quantity of the target resource group; determining whether the target resource group needs to be scaled according to the current cluster resource quantity of the target resource group, the set of initial cluster resource quantities, and the first time window, and obtaining a first determination result; if the first determination result is that the target resource group needs to be scaled, the first determination result is taken as the target determination result; if the first determination result is that the target resource group does not need to be scaled, whether the target resource group needs to be scaled is determined according to the current cluster resource quantity of the target resource group, the set of initial cluster resource quantities, and the second time window, and a second determination result is obtained; and the target determination result is determined according to the second determination result.

[0072] The first time window can be an expansion time window, and the second time window can be a contraction time window. The expansion and contraction use different sizes of stable time windows. In the process of judging whether the target resource group needs expansion and contraction processing according to the initial cluster resource quantity set and the target time window, the current cluster resource quantity of the target resource group, for example, the current replica quantity, is obtained, and then whether the target resource group needs expansion processing is judged according to the current cluster resource quantity of the target resource group, the initial cluster resource quantity set and the expansion time window, to obtain a first judgment result. In the case where the first judgment result is that the target resource group needs expansion processing, the first judgment result is taken as the target judgment result, that is, it is determined that the target judgment result is that the target resource group needs expansion processing. For example, whether the target resource group needs expansion processing is judged according to the current replica quantity of the target resource group, the initial cluster resource quantity set (3, 4, 5, 6) and the expansion time window (for example, the window length is 3, which means that the expansion time window contains 3 cluster quantity values), to obtain a first judgment result.

[0073] Optionally, in the case where the first judgment result is that the target resource group does not need expansion processing, whether the target resource group needs contraction processing can be judged according to the current cluster resource quantity of the target resource group, the initial cluster resource quantity set and the contraction time window, to obtain a second judgment result, and then the target judgment result is determined according to the second judgment result. For example, whether the target resource group needs contraction processing is judged according to the current replica quantity of the target resource group, the initial cluster resource quantity set (3, 4, 5, 6) and the contraction time window (for example, the window length is 5, which means that the contraction time window contains 5 cluster quantity values), to obtain a second judgment result. In the case where the second judgment result is that the target resource group needs contraction processing, the second judgment result is taken as the target judgment result, that is, it is determined that the target judgment result is that the target resource group needs contraction processing. In the case where the second judgment result is that the target resource group does not need contraction processing, it can be determined that the target judgment result is that the target resource group does not need contraction processing. In addition, whether the target resource group needs expansion and contraction processing can be further judged according to passive expansion and contraction of real-time index monitoring in the automatic multi-cluster expansion and contraction strategy, to realize double protection of expansion and contraction decision.

[0074] It should be noted that by using different sizes of stable time windows (expansion is small, and contraction is large), flexible expansion and stable contraction are realized, and temporary load fluctuation is effectively avoided to cause incorrect expansion and contraction decision.

[0075] In order to determine the first determination result, in the cluster resource processing method provided in Embodiment One of the present application, whether the target resource group needs expansion processing is determined according to the current cluster resource quantity of the target resource group, the initial cluster resource quantity set and the first time window, and the first determination result is obtained, including: obtaining a first historical cluster resource quantity set, and forming a first cluster resource quantity set according to the first historical cluster resource quantity set and the initial cluster resource quantity set; determining a plurality of cluster resource quantities in the current first time window and a plurality of cluster resource quantities in a plurality of subsequent first time windows of the current first time window from the first cluster resource quantity set, wherein the plurality of subsequent first time windows are obtained by updating the current first time window; determining whether the target resource group needs expansion processing according to the current cluster resource quantity of the target resource group, the plurality of cluster resource quantities in the current first time window and the plurality of cluster resource quantities in the plurality of subsequent first time windows, and obtaining the first determination result.

[0076] Optionally, the first historical cluster resource quantity set is obtained, and the first cluster resource quantity set is formed according to the first historical cluster resource quantity set and the initial cluster resource quantity set, wherein the first historical cluster resource quantity set can be a recommended cluster quantity calculated by historical performance index data generated before, or a historical predicted recommended cluster quantity, for example, the first historical cluster resource quantity set is (1, 1, 2, 2, 2), the initial cluster resource quantity set is (3, 4, 5, 6), and the first cluster resource quantity set is (1, 1, 2, 2, 2, 3, 4, 5, 6).

[0077] Optionally, the plurality of cluster resource quantities in the current first time window and the plurality of cluster resource quantities in the plurality of subsequent first time windows of the current first time window are determined from the first cluster resource quantity set, for example, the plurality of cluster resource quantities in the current expansion time window is (2, 2, 2), the plurality of cluster resource quantities in the first subsequent expansion time window obtained by sliding the window backward is (2, 2, 3), and the window is sequentially slid backward until a far prediction time (cluster pull-up time), for example, the cluster pull-up time is 20 seconds and the prediction interval is 5 seconds, so the window is sequentially slid backward until the fourth subsequent expansion time window, and the plurality of cluster resource quantities in the expansion time window are (2, 3, 4), (3, 4, 5) and (4, 5, 6) respectively.

[0078] In order to determine the first determination result, in the cluster resource processing method provided by the first embodiment of the present application, whether the target resource group needs to be expanded is determined according to the current cluster resource quantity of the target resource group, the plurality of cluster resource quantities in the current first time window, and the plurality of cluster resource quantities in the plurality of subsequent first time windows, and the first determination result is obtained, including: determining a first quantity from the plurality of cluster resource quantities in the current first time window and the plurality of cluster resource quantities in the subsequent first time window of the plurality of subsequent first time windows respectively, obtaining the first quantity corresponding to the current first time window and the first quantity corresponding to the subsequent first time window of the plurality of subsequent first time windows; comparing the current cluster resource quantity of the target resource group with the first quantity corresponding to the current first time window to obtain a first comparison result, and comparing the current cluster resource quantity of the target resource group with the first quantity corresponding to the subsequent first time window of the plurality of subsequent first time windows respectively to obtain a plurality of second comparison results; if the first comparison result represents that the current cluster resource quantity of the target resource group is less than the first quantity corresponding to the current first time window, and the plurality of second comparison results all represent that the current cluster resource quantity of the target resource group is less than the first quantity corresponding to the subsequent first time window of the plurality of subsequent first time windows, then the target resource group needs to be expanded as the first determination result; if the first comparison result represents that the current cluster resource quantity of the target resource group is greater than or equal to the first quantity corresponding to the current first time window, or there is a second comparison result in the plurality of second comparison results representing that the current cluster resource quantity of the target resource group is greater than or equal to the first quantity corresponding to the subsequent first time window of the plurality of subsequent first time windows, then the target resource group does not need to be expanded as the first determination result.

[0079] Optionally, the first quantity can be a smaller value in the plurality of cluster resource quantities in the expansion time window, and the smaller value is determined from the plurality of cluster resource quantities in the current expansion time window and the plurality of cluster resource quantities in the subsequent expansion time window of the plurality of subsequent expansion time windows respectively, and the smaller value corresponding to the current expansion time window and the smaller value corresponding to the subsequent expansion time window of the plurality of subsequent expansion time windows are obtained, for example, the smaller value corresponding to the current expansion time window (2, 2, 2) min = 2, the smaller value corresponding to the subsequent expansion time window of the plurality of subsequent expansion time windows is (2, 3, 4) min = 2, (3, 4, 5) min = 3, (4, 5, 6) min = 4.

[0080] Optionally, the current cluster resource quantity of the target resource group is compared with the first quantity corresponding to the current expansion time window to obtain a first comparison result, and the current cluster resource quantity of the target resource group is compared with the first quantity corresponding to the subsequent expansion time window in the plurality of subsequent expansion time windows to obtain a plurality of second comparison results, for example, the current replica quantity is 1 (i.e., there is 1 cluster at present), the current replica quantity (1) of the target resource group is compared with the smaller value (2) corresponding to the current expansion time window to obtain a first comparison result, and the current replica quantity (1) is compared with the smaller values (2, 3, 4) corresponding to the subsequent expansion time windows to obtain a plurality of second comparison results.

[0081] Optionally, if the first comparison result indicates that the current cluster resource quantity of the target resource group is less than the first quantity corresponding to the current expansion time window, and the plurality of second comparison results all indicate that the current cluster resource quantity of the target resource group is less than the first quantity corresponding to the subsequent expansion time window in the plurality of subsequent expansion time windows, the target resource group needs expansion processing as the first judgment result, for example, if the current replica quantity is less than the smaller value corresponding to the expansion time window, it indicates that the target resource group should be expanded to the smaller value corresponding to the expansion time window, and if it is judged that the subsequent expansion time windows are all expansion, the target resource group needs expansion processing as the first judgment result.

[0082] Optionally, if the first comparison result indicates that the current cluster resource quantity of the target resource group is greater than or equal to the first quantity corresponding to the current expansion time window, or there is a second comparison result in the plurality of second comparison results indicating that the current cluster resource quantity of the target resource group is greater than or equal to the first quantity corresponding to the subsequent expansion time window in the plurality of subsequent expansion time windows, the target resource group does not need expansion processing as the first judgment result.

[0083] It should be noted that a longer time window may delay the expansion decision due to temporary backsliding, and slower expansion means longer user load damage, therefore, by using a shorter expansion time window, the query task can be effectively prevented from being damaged.

[0084] In order to determine the second determination result, in the cluster resource processing method provided in Embodiment One of the present application, whether the target resource group needs to be scaled down is determined according to the current cluster resource quantity of the target resource group, the initial cluster resource quantity set and the second time window, and the second determination result is obtained, including: obtaining a second historical cluster resource quantity set, and forming a second cluster resource quantity set according to the second historical cluster resource quantity set and the initial cluster resource quantity set; determining a plurality of cluster resource quantities in the current second time window and a plurality of cluster resource quantities in a plurality of subsequent second time windows of the current second time window from the second cluster resource quantity set, wherein the plurality of subsequent second time windows are obtained by updating the current second time window, and the number of the plurality of subsequent second time windows is greater than the number of the plurality of subsequent first time windows; determining whether the target resource group needs to be scaled down according to the current cluster resource quantity of the target resource group, the plurality of cluster resource quantities in the current second time window, and the plurality of cluster resource quantities in the plurality of subsequent second time windows, and obtaining the second determination result.

[0085] Optionally, the second historical cluster resource quantity set is obtained, and the second cluster resource quantity set is formed according to the second historical cluster resource quantity set and the initial cluster resource quantity set, for example, the second historical cluster resource quantity set is (5, 5, 5, 3, 3, 4, 4), the initial cluster resource quantity set is (3, 4, 5, 6), and the second cluster resource quantity set is (5, 5, 5, 3, 3, 4, 4, 3, 4, 5, 6).

[0086] Optionally, a plurality of cluster resource quantities in the current scaling-down time window and a plurality of cluster resource quantities in a plurality of subsequent scaling-down time windows of the current scaling-down time window are determined from the second cluster resource quantity set, for example, the plurality of subsequent scaling-down time windows is 7, that is, the time window is slid back 7 times, and then whether the target resource group needs to be scaled down is determined according to the current cluster resource quantity of the target resource group, the plurality of cluster resource quantities in the current scaling-down time window, and the plurality of cluster resource quantities in the plurality of subsequent scaling-down time windows, and the second determination result is obtained. The specific implementation details are similar to those of the scaling-up time window, which will not be repeated here.

[0087] In order to determine the second determination result, in the cluster resource processing method provided in Embodiment One of the present application, whether the target resource group needs to be scaled down is determined according to the current cluster resource quantity of the target resource group, the plurality of cluster resource quantities in the current second time window, and the plurality of cluster resource quantities in the plurality of subsequent second time windows, and the second determination result is obtained, including: determining a second quantity from the plurality of cluster resource quantities in the current second time window and the plurality of cluster resource quantities in the subsequent second time window of the plurality of subsequent second time windows respectively, obtaining the second quantity corresponding to the current second time window and the second quantity corresponding to the subsequent second time window of the plurality of subsequent second time windows, wherein the second quantity is greater than the first quantity; comparing the current cluster resource quantity of the target resource group with the second quantity corresponding to the current second time window to obtain a third comparison result, and comparing the current cluster resource quantity of the target resource group with the second quantity corresponding to the subsequent second time window of the plurality of subsequent second time windows respectively to obtain a plurality of fourth comparison results; if the third comparison result represents that the current cluster resource quantity of the target resource group is greater than the second quantity corresponding to the current second time window, and the plurality of fourth comparison results all represent that the current cluster resource quantity of the target resource group is greater than the second quantity corresponding to the subsequent second time window of the plurality of subsequent second time windows, then it is determined that the target resource group needs to be scaled down as the second determination result; if the third comparison result represents that the current cluster resource quantity of the target resource group is less than or equal to the second quantity corresponding to the current second time window, or there is a fourth comparison result in the plurality of fourth comparison results representing that the current cluster resource quantity of the target resource group is less than or equal to the second quantity corresponding to the subsequent second time window of the plurality of subsequent second time windows, then it is determined that the target resource group does not need to be scaled down as the second determination result.

[0088] Optionally, the second quantity can be a larger value in the plurality of cluster resource quantities in the scaling-down time window, the larger value is determined from the plurality of cluster resource quantities in the current scaling-down time window and the plurality of cluster resource quantities in the subsequent scaling-down time window of the plurality of subsequent scaling-down time windows respectively, the larger value corresponding to the current scaling-down time window and the larger value corresponding to the subsequent scaling-down time window of the plurality of subsequent scaling-down time windows are obtained, and then the current cluster resource quantity of the target resource group is compared with the larger value corresponding to the current scaling-down time window to obtain a third comparison result, and the current cluster resource quantity of the target resource group is compared with the larger value corresponding to the subsequent scaling-down time window of the plurality of subsequent scaling-down time windows respectively to obtain a plurality of fourth comparison results. The specific implementation details are similar to those of the scaling-up time window, which will not be repeated here.

[0089] Optionally, if the third comparison result represents that the current cluster resource quantity of the target resource group is greater than the greater value corresponding to the current shrink time window, and the plurality of fourth comparison results all represent that the current cluster resource quantity of the target resource group is greater than the greater value corresponding to the subsequent shrink time window in the plurality of subsequent shrink time windows, the target resource group needs to be handled as the second judgment result. For example, if the current replica quantity is greater than the greater value corresponding to the shrink time window, it indicates that the target resource group should be shrunk to the greater value corresponding to the shrink time window, and if it is judged that the subsequent several shrink time windows are all shrink, the target resource group needs to be handled as the second judgment result.

[0090] Optionally, if the third comparison result represents that the current cluster resource quantity of the target resource group is less than or equal to the greater value corresponding to the current shrink time window, or there is a fourth comparison result in the plurality of fourth comparison results representing that the current cluster resource quantity of the target resource group is less than or equal to the greater value corresponding to the subsequent shrink time window in the plurality of subsequent shrink time windows, the target resource group does not need to be handled as the second judgment result.

[0091] It should be noted that using a longer shrink time window for decision making can effectively avoid temporary load backfall leading to shrinkage, and generate cluster size shock.

[0092] In order to be able to predict load changes in advance, in the cluster resource processing method provided by the first embodiment of the present application, the target time series prediction model is generated in the following manner: before the start of the prediction period, the target time series data of the target resource group is obtained, wherein the target time series data is composed of performance indicator data of a plurality of historical time points; and the initial time series prediction model is retrained according to the target time series data to obtain the target time series prediction model.

[0093] In order to be able to obtain predicted performance indicator data, in the cluster resource processing method provided by the first embodiment of the present application, after obtaining the target time series prediction model, when the prediction period starts, the performance indicator data in the period time period corresponding to the prediction period is obtained; the target time series prediction model is used to perform time series prediction calculation based on the performance indicator data in the period time period to obtain predicted performance indicator data, wherein the predicted performance indicator data includes predicted values of performance indicator data of a plurality of future time points.

[0094] Since time series prediction requires historical data for model training and optimization, the instantaneous indicator alone is not enough, and the historical data of the performance indicators required for predicting load changes need to be obtained for model initialization training. After obtaining the historical data, the cluster state is periodically obtained at a certain period, the model is updated and prediction is performed. For example, the data of the performance indicators required for predicting load changes can be calculated by the target time series prediction model.

[0095] Therefore, before the prediction period starts, the target time series data of the target resource group is acquired, and then the initial time series prediction model is retrained according to the target time series data, so that the target time series prediction model can be obtained. After the target time series prediction model is obtained, when the prediction period starts, the performance index data in the period time period corresponding to the prediction period is acquired, and the target time series prediction model is used to perform time series prediction calculation based on the performance index data in the period time period, so that the predicted performance index data is obtained. Optionally, the target time series prediction model can be an autoregressive integrated moving average (ARIMA) model, an exponential smoothing model, or other time series prediction algorithm. One time series prediction can output multiple prediction values, for example, the index prediction values after x, 2x, 3x and the like (where x is a preset period), which are used for scaling decisions after different periods.

[0096] It should be noted that the automatic elastic scaling of the multi-cluster is realized based on the time series prediction, that is, the cluster load change can be predicted in advance, the cluster can be scaled in advance before the cluster load increases, the resources can be prepared before the cluster load peak arrives, the query task can be effectively prevented from being damaged, and the cluster can be scaled in advance before the cluster load drops, so as to reduce resource idling and waste.

[0097] In order to realize the automatic elastic scaling, in the cluster resource processing method provided in Embodiment One of the present application, if the target judgment result is that the target resource group needs scaling processing, the scaling processing of the cluster resource of the target resource group includes: if the target judgment result is that the target resource group needs scaling processing, the target index information of the target component is acquired, and whether the cluster resource of the target resource group needs scaling processing is determined according to the target index information, wherein the target index information is used to represent whether the target component is in an available state; and if the target judgment result is that the target resource group needs scaling processing, the cluster resource of the target resource group is scaled according to the target second number, so as to reduce the current cluster number of the target resource group.

[0098] Since when the target component (such as the upstream and downstream query distribution and storage components) reaches the bottleneck, even if the scaling needs to be performed, the scaling should be avoided because there is no benefit at this time, therefore, the target component can be alarmed, for example, the negative index (i.e., the target index) is used to guide the scaling, the states of the upstream and downstream query distribution and storage components are collected, when the utilization rates of these components are too high, the negative index alarm is triggered, and the scaling is avoided when the negative index alarm is triggered.

[0099] Therefore, if the target judgment result is that the target resource group needs to be expanded, target index information of the target component (e.g., whether an alarm occurs for a negative index) is acquired, and whether the cluster resource of the target resource group is expanded is determined according to the target index information.

[0100] In order to determine whether the cluster resource of the target resource group is expanded, in the cluster resource processing method provided in Embodiment One of the present application, whether the cluster resource of the target resource group is expanded according to the target index information includes: if the target index information indicates that the target component is in an available state, the cluster resource of the target resource group is expanded according to the target first quantity to increase the current cluster quantity of the target resource group; and if the target index information indicates that the target component is not in an available state, the cluster resource of the target resource group is not expanded.

[0101] Optionally, if the target index information indicates that the target component is in an available state, it means that the related component does not reach a bottleneck, and therefore the cluster resource of the target resource group can be expanded according to the target first quantity to increase the current cluster quantity of the target resource group, where the target first quantity can be a larger value in window values (i.e., the smaller values mentioned above) of multiple expansion time windows, for example, the target first quantity is (2, 2, 3, 4) = 4, and the current cluster quantity of the target resource group is increased to 4. max

[0102] Optionally, if the target index information indicates that the target component is not in an available state, it means that the related component reaches a bottleneck, and therefore the cluster resource of the target resource group is not expanded.

[0103] Optionally, if the target judgment result is that the target resource group needs to be shrunk, the cluster resource of the target resource group is shrunk according to the target second quantity to reduce the current cluster quantity of the target resource group, where the target second quantity can be a larger value in window values (i.e., the larger values mentioned above) of multiple shrinking time windows.

[0104] It should be noted that the expansion guided by the negative index can effectively avoid resource waste and cost increase caused by expansion when the related component reaches a bottleneck.

[0105] In order to ensure the stability of the expansion and shrinking decision, in the cluster resource processing method provided in Embodiment One of the present application, after the target performance index data of the target resource group is acquired, if the predicted performance index data does not exist in the target performance index data, or the target judgment result is that the target resource group does not need to be expanded or shrunk, whether the target resource group needs to be expanded or shrunk is determined according to real-time performance index data in the target performance index data and a target time window, and a third judgment result is obtained.

[0106] ​Optionally, when the time series prediction fails to obtain the prediction performance indicator data, passive scaling decisions can be made based on the current state of the cluster, i.e., the passive scaling link is activated when the active scaling based on time series prediction fails in the automatic multi-cluster scaling strategy, so that the real-time indicator monitoring is not affected. Therefore, after obtaining the target performance indicator data of the target resource group, if there is no prediction performance indicator data in the target performance indicator data, or the target determination result is that the target resource group does not need scaling processing, the real-time performance indicator data in the target performance indicator data and the target time window (i.e., the foregoing scaling time window and the foregoing scaling time window) can be used to determine whether the target resource group needs scaling processing, and a third determination result is obtained.

[0107] For example, if it is determined that the target resource group needs scaling processing based on the real-time performance indicator data and the historical performance indicator data included in the scaling time window, the third determination result is that the target resource group needs scaling processing. If it is determined that the target resource group needs scaling processing based on the real-time performance indicator data and the historical performance indicator data included in the scaling time window, the third determination result is that the target resource group needs scaling processing.

[0108] It should be noted that the passive scaling decision based on real-time indicator monitoring is used as a backup strategy, which effectively ensures the stability of the scaling decision.

[0109] In an optional embodiment, the automatic multi-cluster scaling strategy can be implemented as shown in the schematic diagram of FIG. 1. Figure 3 The schematic diagram of FIG. 1 shows an automatic multi-cluster scaling strategy. Figure 3 The schematic diagram of FIG. 1 shows an automatic multi-cluster scaling strategy. Figure 3 The architecture of the automatic multi-cluster scaling strategy mainly includes an indicator collection module, a cluster, a time series prediction module, a decision module, and a controller. The time series prediction can predict the change of the cluster load, and the real-time load indicator of the cluster is combined to give a scaling suggestion of the cluster number, and the application controller (Operator) of the container cluster management system is used to control the cluster to perform scaling.

[0110] The indicator collection module is responsible for collecting and storing the indicator data of the cluster resources of the resource group in real time. The indicators used for scaling guidance suggestions need to meet the characteristics of high real-time performance and good reliability. For example, a monitoring and alarm service (which can provide functions such as indicator collection, aggregation, and analysis) is used as the indicator collection module. The monitoring and alarm service collects and stores the indicator data from the cluster (such as the indicator generation shown in FIG. 2), and the services in the cluster can obtain the indicators stored in the monitoring and alarm service. It should be noted that the indicator collection data link using the monitoring and alarm service has a faster indicator acquisition speed and shorter delay. Figure 3 ​

[0111] a time series prediction module, responsible for retraining a time series prediction model according to time series data obtained from the index collection module before the prediction period starts, obtaining a target time series prediction model, and performing time series prediction calculation through the target time series prediction model when the prediction period starts to obtain prediction performance index data and transmit the prediction performance index data to the index collection module.

[0112] Optionally, the time series prediction module works as an independent module and depends on the index collection module. For example, the time series prediction module collects data (such as Figure 3 indicated in the index collection) from the index collection module, performs time series prediction calculation, and outputs the calculation result to the index collection module as a new index (such as Figure 3 indicated in the prediction index output). The time series prediction module working in this way is independent of the link of the entire automatic multi-cluster scaling strategy, and when the time series prediction module fails, it does not affect the passive scaling link in the automatic multi-cluster scaling strategy to take effect.

[0113] For example, the time series prediction module collects the required index types for scaling guidance recommendations. Since time series prediction requires historical data for model training and tuning, individual real-time indicators are not enough. The time series prediction module also requests historical data of corresponding indicators from the monitoring and alarm service for model initialization training. After obtaining the historical data, the time series prediction module periodically obtains the newer state of the cluster at a certain period, updates the model and performs prediction.

[0114] Optionally, the time series prediction module can provide multiple models for time series prediction, such as ARIMA, Exponential smooth, etc. The time series prediction module outputs the prediction result to the monitoring and alarm service. One time series prediction can output multiple prediction values, for example, the index prediction values after x, 2x, 3x time (where x is a preset period), for scaling decisions at different periods.

[0115] a decision module, responsible for determining whether the resource group needs to be scaled according to the performance index data obtained from the index collection module and the stability time window, obtaining a target determination result, and transmitting the target determination result to the controller. For example, using the automatic scaling engine as the decision module, the automatic scaling engine collects specific indicators from the monitoring and alarm service to obtain the current state and predicted future state of the cluster for guiding cluster scaling decisions. The automatic scaling engine will make scaling decisions based on the time series prediction result and the current state of the cluster. When the prediction index cannot be obtained, passive scaling decisions can be made based on the current state of the cluster.

[0116] Since the query load may have occasional peaks and fluctuations, the load may rise or fall at some time points, which does not represent the need for scaling. Therefore, the automatic scaling engine uses a stable time window as the basis for decision-making. For example, the scaling recommendation (such as the recommended cluster number value) recorded needs to meet the corresponding conditions within the stable time window to perform scaling. For example, if the current replica number is smaller than the smaller value corresponding to the scaling time window, it indicates that the scaling should be performed to the smaller value corresponding to the scaling time window. If the current replica number is larger than the larger value corresponding to the scaling time window, it indicates that the scaling should be performed to the larger value corresponding to the scaling time window.

[0117] Figure 4 is a schematic diagram of an optional time window judgment process provided by Embodiment One of the present application. As shown in Figure 4 the first row of data, the recommended cluster number in the current stable time window is (1, 1, 1, 1, 1, 1, 2). The smaller value in these data is 1 (i.e., the min of the current stable time window is 1), and the larger value in these data is 2 (i.e., the max of the current stable time window is 2). If the current replica number is 1, the data before stabilization (i.e., the recommended cluster number) is 2. By comparing the current replica number with the smaller value or the larger value corresponding to the stable time window, since the current replica number (1) is not smaller than the smaller value (1) corresponding to the stable time window, nor larger than the larger value (2) corresponding to the stable time window, the data after stabilization (i.e., the decision value) is 1, that is, the decision result of the current time window is that no scaling is needed, and the time window is slid to the right and the larger value and the smaller value in the time window are determined again for new decision-making.

[0118] Optionally, a shorter scaling time window is used for scaling. Since a longer time window may have a temporary drop and delay the scaling decision, and slower scaling means longer user load damage, using a shorter scaling time window can effectively avoid query task damage. Optionally, the scaling time window is used to determine whether scaling is needed in multiple subsequent scaling time windows for active scaling decision. If scaling is needed, scaling is performed. When no active scaling is performed, passive scaling decision can be performed using the scaling time window to avoid scaling failure caused by timing prediction failure.

[0119] Optionally, scaling down uses a longer time window to avoid scaling down due to temporary load drops, which can cause cluster size fluctuations. Optionally, proactive scaling decisions use the time window to determine whether scaling down is required within multiple subsequent time windows. If scaling down is required in all subsequent time windows, scaling down is performed. When proactive scaling down is not performed, reactive scaling decisions can be made using the time window to avoid scaling down failures due to timing prediction failures.

[0120] Optionally, when upstream and downstream query distribution and storage components reach bottlenecks, even if capacity expansion is required, it should be avoided because expansion is no longer beneficial. Therefore, alarms are issued for relevant computing components. For example, capacity expansion is guided by negative indicators. By collecting the status of upstream and downstream query distribution and storage components, when the usage rate of these components is too high, a negative indicator alarm is triggered. When a negative indicator alarm occurs, capacity expansion is avoided.

[0121] The controller is responsible for determining the target number of cluster resources based on the target judgment results (such as scaling recommendations) and increasing or decreasing the number of clusters in the resource group based on the target number of cluster resources.

[0122] In an embodiment of the present application, target performance indicator data of a target resource group is obtained, wherein the target resource group is composed of at least one cluster resource, and the target performance indicator data is used to characterize the usage of the cluster resources of the target resource group; if there is predicted performance indicator data in the target performance indicator data, whether the target resource group needs to be expanded or reduced is judged based on the predicted performance indicator data and the target time window to obtain a target judgment result, wherein the predicted performance indicator data is obtained in advance by performing time series prediction on a target time series prediction model, and the target time window is a continuous time period consisting of a start and end time point; if the target judgment result is that the target resource group needs to be expanded or reduced, the cluster resources of the target resource group are expanded or reduced, and a multi-cluster method is implemented based on time series prediction. Automatic elastic scaling of the cluster means that it can predict cluster load changes in advance, and can expand the cluster in advance before the cluster load increases, so as to prepare resources before the cluster load peak arrives, effectively avoiding damage to query tasks. It can shrink the cluster in advance before the cluster load drops, so as to reduce idle resources and waste. In addition, the use of time windows can ensure the stability of scaling decisions, effectively avoid temporary fluctuations that lead to erroneous scaling decisions, improve the flexibility and accuracy of cluster resource processing, and achieve the purpose of automatic elastic scaling of multiple clusters, thereby achieving the technical effect of reducing cluster resource waste or shortage, and thus solving the technical problem in related technologies that manual scaling of the database resource group's cluster resources based on the cluster load has a lag, resulting in cluster resource waste or shortage.

[0123] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all described as a combination of a series of actions, but those skilled in the art should know that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0124] Those skilled in the art can clearly understand from the description of the foregoing embodiments that the method according to the foregoing embodiments can be realized by means of software and a necessary general hardware platform, and of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the method of each embodiment of the present application.

[0125] Embodiment 2

[0126] According to the embodiments of the present application, a cluster resource processing system is also provided, as shown in Figure 5 The system comprises:

[0127] The index collection module 501 is configured to collect index data of a target performance index of a cluster resource of a target resource group in real time, and store the index data of the target performance index.

[0128] The time series prediction module 502 is configured to retrain an initial time series prediction model according to target time series data obtained from the index collection module before the start of a prediction period, to obtain a target time series prediction model, and when the prediction period starts, perform time series prediction calculation through the target time series prediction model to obtain predicted performance index data, and transmit the predicted performance index data to the index collection module, wherein the target time series data is composed of performance index data of a plurality of historical time points.

[0129] The decision module 503 is configured to determine whether the target resource group needs to be scaled according to target performance index data and a target time window obtained from the index collection module, to obtain a target determination result, and transmit the target determination result to the controller, wherein the target performance index data includes at least one of the following: predicted performance index data, real-time performance index data.

[0130] The controller 504 is configured to determine the target cluster resource quantity based on the target determination result, and increase or decrease the cluster resource of the target resource group according to the target cluster resource quantity.

[0131] Through the above scheme, the multi-cluster automatic elastic scaling is realized based on time series prediction, that is, the cluster load change can be predicted in advance, the cluster scaling can be performed in advance before the cluster load rises, the resources can be prepared before the cluster load peak, the query task can be effectively avoided from being damaged, the cluster scaling can be performed in advance before the cluster load drops, the resource idling and waste can be reduced, in addition, the time window is used to guarantee the stability of the scaling decision, the temporary fluctuation is effectively avoided to cause the wrong scaling decision, the flexibility and accuracy of the cluster resource processing are improved, the purpose of the multi-cluster automatic elastic scaling is achieved, and the technical effects of reducing the cluster resource waste or deficiency are achieved, and thus the technical problem that the cluster resource of the database resource group is manually scaled in the related art according to the cluster load, and the cluster resource is wasted or insufficient is solved.

[0132] In the cluster resource processing system, the specific method of processing the cluster resource is the same as that in the method in the first embodiment, and details are not described herein.

[0133] It should be noted that, for the foregoing method embodiments, in order to simply describe, the foregoing method embodiments are described as a series of action combinations, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, certain steps can be performed in other order or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0134] Those skilled in the art can clearly understand the method according to the above-mentioned embodiments can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, or network device) execute the method of each embodiment of the present application.

[0135] Embodiment 3

[0136] According to the embodiments of the present application, a cluster resource processing apparatus for implementing the cluster resource processing method is also provided, such as Figure 6As shown, the apparatus comprises: an acquisition unit 601, a determination unit 602, and a processing unit 603.

[0137] The acquisition unit 601 is configured to acquire target performance indicator data of a target resource group, wherein the target resource group is composed of at least one cluster resource, and the target performance indicator data is used to represent the usage of the cluster resource of the target resource group.

[0138] The determination unit 602 is configured to, if there is predicted performance indicator data in the target performance indicator data, determine whether the target resource group needs to be scaled according to the predicted performance indicator data and a target time window, to obtain a target determination result, wherein the predicted performance indicator data is obtained by performing time series prediction on the target time series prediction model in advance, and the target time window is a continuous time period composed of a start time point and an end time point.

[0139] The processing unit 603 is configured to, if the target determination result is that the target resource group needs to be scaled, perform scaling on the cluster resource of the target resource group.

[0140] In the cluster resource processing apparatus provided in Embodiment Three, the acquisition unit 601 is configured to acquire target performance indicator data of a target resource group, wherein the target resource group is composed of at least one cluster resource, and the target performance indicator data is used to represent the usage of the cluster resource of the target resource group; the determination unit 602 is configured to, if there is predicted performance indicator data in the target performance indicator data, determine whether the target resource group needs to be scaled according to the predicted performance indicator data and a target time window, to obtain a target determination result, wherein the predicted performance indicator data is obtained by performing time series prediction on the target time series prediction model in advance, and the target time window is a continuous time period composed of a start time point and an end time point; and the processing unit 603 is configured to, if the target determination result is that the target resource group needs to be scaled, perform scaling on the cluster resource of the target resource group. In this solution, time series prediction is used to realize automatic elastic scaling of multiple clusters, that is, the cluster load change can be predicted in advance, the cluster can be scaled in advance before the cluster load rises, so that resources are prepared before the cluster load peak, the query task is effectively prevented from being damaged, the cluster can be scaled in advance before the cluster load drops, so that resource idling and waste are reduced, in addition, the use of the time window can guarantee the stability of the scaling decision, effectively prevent temporary fluctuations from leading to incorrect scaling decisions, improve the flexibility and accuracy of the cluster resource processing, and achieve the purpose of automatic elastic scaling of multiple clusters, thereby achieving the technical effect of reducing cluster resource waste or deficiency, and further solving the technical problem of lag in manually scaling the cluster resource of the database resource group according to the cluster load in the related art, leading to cluster resource waste or deficiency.

[0141] Optionally, in the cluster resource processing apparatus provided in Embodiment Three of the present application, the judging unit 602 comprises: a calculating sub-unit, configured to calculate a set of initial cluster resource quantities required for a predicted time period corresponding to the predicted performance index data according to the predicted performance index data, wherein the predicted time period is divided into a plurality of time intervals, and each time interval corresponds to an initial cluster resource quantity; and a judging sub-unit, configured to judge whether the target resource group needs to be scaled according to the set of initial cluster resource quantities and the target time window, to obtain a target judging result.

[0142] Optionally, in the cluster resource processing apparatus provided in Embodiment Three of the present application, the target time window is one of the following: a first time window and a second time window, the time length corresponding to the first time window is shorter than the time length corresponding to the second time window, and the judging sub-unit comprises: an obtaining module, configured to obtain the current cluster resource quantity of the target resource group; a first judging module, configured to judge whether the target resource group needs to be scaled according to the current cluster resource quantity of the target resource group, the set of initial cluster resource quantities and the first time window, to obtain a first judging result; a first determining module, configured to take the first judging result as the target judging result if the first judging result indicates that the target resource group needs to be scaled; a second judging module, configured to judge whether the target resource group needs to be scaled according to the current cluster resource quantity of the target resource group, the set of initial cluster resource quantities and the second time window if the first judging result indicates that the target resource group does not need to be scaled, to obtain a second judging result; and a second determining module, configured to determine the target judging result according to the second judging result.

[0143] Optionally, in the cluster resource processing apparatus provided in Embodiment Three of the present application, the first judging module comprises: a first obtaining sub-module, configured to obtain a first set of historical cluster resource quantities, and to form a first set of cluster resource quantities according to the first set of historical cluster resource quantities and the set of initial cluster resource quantities; a first determining sub-module, configured to determine a plurality of cluster resource quantities within the current first time window and a plurality of cluster resource quantities within a plurality of subsequent first time windows of the current first time window from the first set of cluster resource quantities, wherein the plurality of subsequent first time windows are obtained by updating the current first time window; and a first judging sub-module, configured to judge whether the target resource group needs to be scaled according to the current cluster resource quantity of the target resource group, the plurality of cluster resource quantities within the current first time window and the plurality of cluster resource quantities within the plurality of subsequent first time windows, to obtain the first judging result.

[0144] Optionally, in the cluster resource processing apparatus provided in Embodiment Three of the present application, the first judging submodule comprises: a first determining sub-submodule, configured to determine a first quantity from the quantity of the plurality of cluster resources in the current first time window and the quantity of the plurality of cluster resources in the subsequent first time window in the plurality of subsequent first time windows respectively, to obtain the first quantity corresponding to the current first time window and the first quantity corresponding to the subsequent first time window in the plurality of subsequent first time windows; a first comparing sub-submodule, configured to compare the current quantity of the cluster resources of the target resource group with the first quantity corresponding to the current first time window to obtain a first comparison result, and compare the current quantity of the cluster resources of the target resource group with the first quantity corresponding to the subsequent first time window in the plurality of subsequent first time windows respectively to obtain a plurality of second comparison results; a second determining sub-submodule, configured to, if the first comparison result indicates that the current quantity of the cluster resources of the target resource group is less than the first quantity corresponding to the current first time window, and the plurality of second comparison results all indicate that the current quantity of the cluster resources of the target resource group is less than the first quantity corresponding to the subsequent first time window in the plurality of subsequent first time windows, take the target resource group needing expansion processing as the first judging result; and a third determining sub-submodule, configured to, if the first comparison result indicates that the current quantity of the cluster resources of the target resource group is greater than or equal to the first quantity corresponding to the current first time window, or there is a second comparison result in the plurality of second comparison results indicating that the current quantity of the cluster resources of the target resource group is greater than or equal to the first quantity corresponding to the subsequent first time window in the plurality of subsequent first time windows, take the target resource group not needing expansion processing as the first judging result.

[0145] Optionally, in the cluster resource processing apparatus provided in Embodiment Three of the present application, the second judging module comprises: a second obtaining submodule, configured to obtain a second historical cluster resource quantity set, and form a second cluster resource quantity set according to the second historical cluster resource quantity set and the initial cluster resource quantity set; a second determining submodule, configured to determine the quantity of the plurality of cluster resources in the current second time window and the quantity of the plurality of cluster resources in the plurality of subsequent second time windows of the current second time window from the second cluster resource quantity set, wherein the plurality of subsequent second time windows are obtained by updating the current second time window, and the number of the plurality of subsequent second time windows is greater than the number of the plurality of subsequent first time windows; and a second judging submodule, configured to judge whether the target resource group needs to be scaled down according to the current quantity of the cluster resources of the target resource group, the quantity of the plurality of cluster resources in the current second time window, and the quantity of the plurality of cluster resources in the plurality of subsequent second time windows, to obtain a second judging result.

[0146] Optionally, in the cluster resource processing device provided in Example 3 of the present application, the second judgment submodule includes: a fourth determination submodule, used to determine the second quantity from multiple cluster resource quantities in the current second time window, and multiple cluster resource quantities in subsequent second time windows in multiple subsequent second time windows, respectively, to obtain the second quantity corresponding to the current second time window, and the second quantity corresponding to the subsequent second time window in multiple subsequent second time windows, wherein the second quantity is greater than the first quantity; a second comparison submodule, used to compare the current cluster resource quantity of the target resource group with the second quantity corresponding to the current second time window, to obtain a third comparison result, and to compare the current cluster resource quantity of the target resource group with the second quantity corresponding to the subsequent second time window in multiple subsequent second time windows, respectively, to obtain multiple The fourth comparison result; the fifth determination sub-module, which is used to determine that the target resource group needs to be scaled down as the second judgment result if the third comparison result indicates that the current number of cluster resources of the target resource group is greater than the second number corresponding to the current second time window, and multiple fourth comparison results all indicate that the current number of cluster resources of the target resource group is greater than the second number corresponding to the subsequent second time window in multiple subsequent second time windows; the sixth determination sub-module, which is used to determine that the target resource group does not need to be scaled down as the second judgment result if the third comparison result indicates that the current number of cluster resources of the target resource group is less than or equal to the second number corresponding to the current second time window, or if there is a fourth comparison result among multiple fourth comparison results indicating that the current number of cluster resources of the target resource group is less than or equal to the second number corresponding to the subsequent second time window in multiple subsequent second time windows.

[0147] Optionally, in the cluster resource processing device provided in Example 3 of the present application, the cluster resource processing device also includes the following units, which are used to generate a target time series prediction model in the following manner: a first acquisition unit, which is used to obtain target time series data of the target resource group before the start of the prediction cycle, wherein the target time series data is composed of performance indicator data of multiple historical time points; a training unit, which is used to retrain the initial time series prediction model based on the target time series data to obtain a target time series prediction model.

[0148] Optionally, in the cluster resource processing device provided in Example 3 of the present application, the cluster resource processing device also includes: a second acquisition unit, used to obtain performance indicator data within a periodic time period corresponding to the prediction period when the prediction period starts after obtaining the target time series prediction model; a calculation unit, used to perform time series prediction calculation based on the performance indicator data within the periodic time period through the target time series prediction model to obtain predicted performance indicator data, wherein the predicted performance indicator data includes predicted values ​​of performance indicator data at multiple time points in the future.

[0149] Optionally, in the cluster resource processing apparatus provided in Embodiment Three of the present application, the processing unit 603 comprises: a determination sub-unit, configured to, if the target determination result is that the target resource group needs expansion processing, acquire target index information of the target component, and determine whether to perform expansion processing on the cluster resource of the target resource group according to the target index information, wherein the target index information is used to represent whether the target component is in an available state; and a first processing sub-unit, configured to, if the target determination result is that the target resource group needs shrinkage processing, perform shrinkage processing on the cluster resource of the target resource group according to the target second quantity, so as to reduce the current cluster quantity of the target resource group.

[0150] Optionally, in the cluster resource processing apparatus provided in Embodiment Three of the present application, the determination sub-unit comprises: a first processing module, configured to, if the target index information represents that the target component is in an available state, perform expansion processing on the cluster resource of the target resource group according to the target first quantity, so as to increase the current cluster quantity of the target resource group; and a second processing module, configured to, if the target index information represents that the target component is not in an available state, not perform expansion processing on the cluster resource of the target resource group.

[0151] Optionally, in the cluster resource processing apparatus provided in Embodiment Three of the present application, the cluster resource processing apparatus further comprises: a first judgment unit, configured to, after acquiring the target performance index data of the target resource group, if there is no predicted performance index data in the target performance index data, or the target determination result is that the target resource group does not need expansion and shrinkage processing, determine whether the target resource group needs expansion and shrinkage processing according to real-time performance index data in the target performance index data and the target time window, to obtain a third determination result.

[0152] It should be noted that the above-mentioned acquisition unit 601, judgment unit 602, and processing unit 603 correspond to steps S201 to S203 in Embodiment One, and the above-mentioned units have the same instances and application scenarios as the corresponding steps, but are not limited to the solutions disclosed in Embodiment One. It should be noted that the above-mentioned modules can run in the computer terminal 10 provided in Embodiment One as part of the apparatus.

[0153] It should be noted that the preferred embodiments involved in the above-mentioned embodiments of the present application have the same solutions, application scenarios, and implementation processes as those provided in Embodiment One, but are not limited to the solutions provided in Embodiment One.

[0154] Embodiment Four

[0155] Embodiments of the present application can provide an electronic device, which can be any one of the electronic devices in the electronic device group. Optionally, in the present embodiment, the above-mentioned electronic device can also be replaced by a terminal device such as a mobile terminal.

[0156] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.

[0157] Optionally, Figure 7 This is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 7 As shown, the electronic device 20 may include: one or more ( Figure 7 (only one is shown) processor 202, memory 204. The electronic device 20 may further include a memory controller to control and manage the memory 204; the electronic device 20 may further include a peripheral interface to connect to a radio frequency module, an audio module, and a display screen, etc.

[0158] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the cluster resource processing method and device in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned cluster resource processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely located relative to the processor, and these remote memories can be connected to the terminal 10 via a network. Examples of the above-mentioned network include but are not limited to the Internet, corporate intranet, local area network, mobile communication network and combinations thereof.

[0159] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain the target performance indicator data of the target resource group, wherein the target resource group is composed of at least one cluster resource, and the target performance indicator data is used to characterize the usage of the cluster resources of the target resource group; if there is predicted performance indicator data in the target performance indicator data, then judge whether the target resource group needs to be expanded or reduced based on the predicted performance indicator data and the target time window to obtain a target judgment result, wherein the predicted performance indicator data is obtained in advance by performing time series prediction through a target time series prediction model, and the target time window is a continuous time period consisting of a start and end time point; if the target judgment result is that the target resource group needs to be expanded or reduced, then the cluster resources of the target resource group are expanded or reduced.

[0160] Optionally, the processor can further execute program codes of the following steps: calculating, according to the predicted performance index data, a set of initial cluster resource quantities required by the predicted performance index data corresponding to a predicted time period, wherein the predicted time period is divided into a plurality of time intervals, and each time interval corresponds to an initial cluster resource quantity; and judging, according to the set of initial cluster resource quantities and the target time window, whether the target resource group needs to be scaled, to obtain a target judgment result.

[0161] Optionally, the processor can further execute program codes of the following steps: obtaining a current cluster resource quantity of the target resource group; judging, according to the current cluster resource quantity of the target resource group, the set of initial cluster resource quantities, and the first time window, whether the target resource group needs to be scaled, to obtain a first judgment result; if the first judgment result is that the target resource group needs to be scaled, taking the first judgment result as the target judgment result; if the first judgment result is that the target resource group does not need to be scaled, judging, according to the current cluster resource quantity of the target resource group, the set of initial cluster resource quantities, and the second time window, whether the target resource group needs to be scaled, to obtain a second judgment result; and determining the target judgment result according to the second judgment result.

[0162] Optionally, the processor can further execute program codes of the following steps: obtaining a first set of historical cluster resource quantities, and composing a first set of cluster resource quantities according to the first set of historical cluster resource quantities and the set of initial cluster resource quantities; determining, from the first set of cluster resource quantities, a plurality of cluster resource quantities in the current first time window and a plurality of cluster resource quantities in a plurality of subsequent first time windows of the current first time window, wherein the plurality of subsequent first time windows are obtained by updating the current first time window; and judging, according to the current cluster resource quantity of the target resource group, the plurality of cluster resource quantities in the current first time window, and the plurality of cluster resource quantities in the plurality of subsequent first time windows, whether the target resource group needs to be scaled, to obtain a first judgment result.

[0163] Optionally, the processor can further execute program codes of the following steps: determining the first quantity from the plurality of cluster resource quantities in the current first time window and the plurality of cluster resource quantities in the subsequent first time window in the plurality of subsequent first time windows respectively, obtaining the first quantity corresponding to the current first time window and the first quantity corresponding to the subsequent first time window in the plurality of subsequent first time windows; comparing the current cluster resource quantity of the target resource group with the first quantity corresponding to the current first time window to obtain a first comparison result, and comparing the current cluster resource quantity of the target resource group with the first quantity corresponding to the subsequent first time window in the plurality of subsequent first time windows to obtain a plurality of second comparison results; if the first comparison result indicates that the current cluster resource quantity of the target resource group is less than the first quantity corresponding to the current first time window, and the plurality of second comparison results all indicate that the current cluster resource quantity of the target resource group is less than the first quantity corresponding to the subsequent first time window in the plurality of subsequent first time windows, then the target resource group needs to be expanded as the first judgment result; if the first comparison result indicates that the current cluster resource quantity of the target resource group is greater than or equal to the first quantity corresponding to the current first time window, or there is a second comparison result in the plurality of second comparison results indicating that the current cluster resource quantity of the target resource group is greater than or equal to the first quantity corresponding to the subsequent first time window in the plurality of subsequent first time windows, then the target resource group does not need to be expanded as the first judgment result.

[0164] Optionally, the processor can further execute program codes of the following steps: obtaining the second historical cluster resource quantity set, and obtaining the second cluster resource quantity set according to the second historical cluster resource quantity set and the initial cluster resource quantity set; determining the plurality of cluster resource quantities in the current second time window and the plurality of cluster resource quantities in the plurality of subsequent second time windows of the current second time window from the second cluster resource quantity set, wherein the plurality of subsequent second time windows are obtained by updating the current second time window, and the number of the plurality of subsequent second time windows is greater than the number of the plurality of subsequent first time windows; determining whether the target resource group needs to be shrunk according to the current cluster resource quantity of the target resource group, the plurality of cluster resource quantities in the current second time window, and the plurality of cluster resource quantities in the plurality of subsequent second time windows, to obtain a second judgment result.

[0165] Optionally, the processor can further execute program codes of the following steps: determining the second quantity from the plurality of cluster resource quantities in the current second time window and the plurality of cluster resource quantities in the subsequent second time window of the plurality of subsequent second time windows respectively, obtaining the second quantity corresponding to the current second time window and the second quantity corresponding to the subsequent second time window of the plurality of subsequent second time windows, wherein the second quantity is greater than the first quantity; comparing the current cluster resource quantity of the target resource group with the second quantity corresponding to the current second time window to obtain a third comparison result, and comparing the current cluster resource quantity of the target resource group with the second quantity corresponding to the subsequent second time window of the plurality of subsequent second time windows respectively to obtain a plurality of fourth comparison results; if the third comparison result represents that the current cluster resource quantity of the target resource group is greater than the second quantity corresponding to the current second time window, and the plurality of fourth comparison results all represent that the current cluster resource quantity of the target resource group is greater than the second quantity corresponding to the subsequent second time window of the plurality of subsequent second time windows, then taking the target resource group needing to be scaled down as the second judgment result; if the third comparison result represents that the current cluster resource quantity of the target resource group is less than or equal to the second quantity corresponding to the current second time window, or there is a fourth comparison result in the plurality of fourth comparison results representing that the current cluster resource quantity of the target resource group is less than or equal to the second quantity corresponding to the subsequent second time window of the plurality of subsequent second time windows, then taking the target resource group not needing to be scaled down as the second judgment result.

[0166] Optionally, the processor can further execute program codes of the following steps: obtaining target time series data of the target resource group before the prediction period starts, wherein the target time series data is composed of performance indicator data of a plurality of historical time points; retraining the initial time series prediction model according to the target time series data to obtain a target time series prediction model.

[0167] Optionally, the processor can further execute program codes of the following steps: after obtaining the target time series prediction model, when the prediction period starts, obtaining performance indicator data in a period time period corresponding to the prediction period; performing time series prediction calculation based on the performance indicator data in the period time period by the target time series prediction model to obtain predicted performance indicator data, wherein the predicted performance indicator data includes predicted values of performance indicator data of a plurality of future time points.

[0168] Optionally, the processor can further execute program codes of the following steps: if the target judgment result is that the target resource group needs to be expanded, obtaining target index information of the target component, and determining whether to expand the cluster resources of the target resource group according to the target index information, wherein the target index information is used to represent whether the target component is in an available state; and if the target judgment result is that the target resource group needs to be shrunk, performing shrinkage processing on the cluster resources of the target resource group according to the target second quantity, so as to reduce the current cluster quantity of the target resource group.

[0169] Optionally, the processor can further execute program codes of the following steps: if the target index information represents that the target component is in an available state, expanding the cluster resources of the target resource group according to the target first quantity, so as to increase the current cluster quantity of the target resource group; and if the target index information represents that the target component is not in an available state, not expanding the cluster resources of the target resource group.

[0170] Optionally, the processor can further execute program codes of the following steps: after obtaining the target performance index data of the target resource group, if there is no predicted performance index data in the target performance index data, or the target judgment result is that the target resource group does not need to be expanded or shrunk, determining whether the target resource group needs to be expanded or shrunk according to real-time performance index data in the target performance index data and the target time window, to obtain a third judgment result.

[0171] Those skilled in the art can understand that, Figure 7 The structure shown is only schematic, and the electronic device can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, or the like. Figure 7 It does not limit the structure of the electronic device. For example, the electronic device 20 can further include more or fewer components (such as a network interface, a display device, etc.) than those shown in the figure, or have a different configuration from that shown in the figure. Figure 7 It does not limit the structure of the electronic device. For example, the electronic device 20 can further include more or fewer components (such as a network interface, a display device, etc.) than those shown in the figure, or have a different configuration from that shown in the figure. Figure 7 It does not limit the structure of the electronic device. For example, the electronic device 20 can further include more or fewer components (such as a network interface, a display device, etc.) than those shown in the figure, or have a different configuration from that shown in the figure.

[0172] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device by a program, and the program can be stored in a computer readable storage medium, which can include a flash disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, etc.

[0173] Embodiment 5

[0174] The embodiment of the present application further provides a computer readable storage medium. Optionally, in the embodiment, the storage medium can be used to save the program code executed by the cluster resource processing method provided in the first embodiment.

[0175] Optionally, in the embodiment, the storage medium can be located in any one of the electronic devices in the computer network or in any one of the mobile terminals in the mobile terminal group.

[0176] Embodiment 6

[0177] The embodiment of the present application further provides a computer program product. Optionally, in the embodiment, the computer program product can include a computer program, and the computer program, when executed by a processor, implements the cluster resource processing method provided in the first embodiment.

[0178] The serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0179] In the above embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0180] In the several embodiments of the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the unit embodiment described above is only schematic. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, units or modules, and can be electrical or other forms.

[0181] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the embodiment.

[0182] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0183] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0184] The above is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should be considered as the protection scope of the present application.

Claims

1. A method for processing cluster resources, characterized in that: include: Acquire target performance indicator data of a target resource group, wherein the target resource group is composed of at least one cluster resource, and the target performance indicator data is used to characterize usage of the cluster resource of the target resource group; If the target performance indicator data includes predicted performance indicator data, determining whether the target resource group needs to be scaled up or down based on the predicted performance indicator data and the target time window, and obtaining a target determination result, wherein the predicted performance indicator data is obtained by performing time series prediction in advance using a target time series prediction model, and the target time window is a continuous time period consisting of a start and end time point; If the target judgment result is that the target resource group needs to be expanded or reduced in capacity, the cluster resources of the target resource group are expanded or reduced in capacity.

2. The method according to claim 1, characterized in that Determining whether the target resource group needs to be scaled up or down based on the predicted performance indicator data and the target time window, and obtaining a target determination result includes: Calculating, based on the predicted performance indicator data, a set of initial cluster resource quantities required for a predicted time period corresponding to the predicted performance indicator data, wherein the predicted time period is divided into a plurality of time intervals, each of which corresponds to an initial cluster resource quantity; Whether the target resource group needs to be expanded or reduced is determined based on the initial cluster resource quantity set and the target time window to obtain the target determination result.

3. The method according to claim 2, characterized in that The target time window is one of the following: a first time window and a second time window, wherein the time length corresponding to the first time window is shorter than the time length corresponding to the second time window, and whether the target resource group needs to be scaled up or down is determined based on the initial cluster resource quantity set and the target time window, and the target determination result includes: Obtain the current number of cluster resources of the target resource group; Determining whether the target resource group needs to be expanded based on the current number of cluster resources of the target resource group, the initial set of cluster resource numbers, and the first time window, to obtain a first determination result; If the first judgment result is that the target resource group needs to be expanded, the first judgment result is used as the target judgment result; If the first judgment result is that the target resource group does not need to be expanded, determining whether the target resource group needs to be reduced based on the current number of cluster resources of the target resource group, the initial number of cluster resources set, and the second time window, to obtain a second judgment result; The target judgment result is determined according to the second judgment result.

4. The method according to claim 3, characterized in that Determining whether the target resource group needs to be expanded based on the current number of cluster resources of the target resource group, the initial set of cluster resource numbers, and the first time window, and obtaining a first determination result includes: Acquire a first historical cluster resource quantity set, and form a first cluster resource quantity set based on the first historical cluster resource quantity set and the initial cluster resource quantity set; Determining, from the first cluster resource quantity set, multiple cluster resource quantities within a current first time window, and multiple cluster resource quantities within multiple subsequent first time windows of the current first time window, wherein the multiple subsequent first time windows are obtained by updating the current first time window; Whether the target resource group needs to be expanded is determined based on the current number of cluster resources of the target resource group, the number of multiple cluster resources in the current first time window, and the number of multiple cluster resources in the multiple subsequent first time windows to obtain the first determination result.

5. The method according to claim 4, characterized in that Determining whether the target resource group needs to be expanded based on the current number of cluster resources of the target resource group, the number of multiple cluster resources in the current first time window, and the number of multiple cluster resources in the multiple subsequent first time windows, wherein the first determination result includes: Determine a first quantity from the multiple quantities of cluster resources in the current first time window and the multiple quantities of cluster resources in the subsequent first time windows, respectively, to obtain a first quantity corresponding to the current first time window and a first quantity corresponding to the subsequent first time window in the multiple subsequent first time windows; Comparing the current number of cluster resources of the target resource group with the first number corresponding to the current first time window to obtain a first comparison result, and respectively comparing the current number of cluster resources of the target resource group with the first numbers corresponding to subsequent first time windows in the multiple subsequent first time windows to obtain multiple second comparison results; If the first comparison result indicates that the current number of cluster resources of the target resource group is less than the first number corresponding to the current first time window, and the multiple second comparison results all indicate that the current number of cluster resources of the target resource group is less than the first number corresponding to the subsequent first time window in the multiple subsequent first time windows, then the target resource group needs to be expanded as the first judgment result; If the first comparison result indicates that the current number of cluster resources of the target resource group is greater than or equal to the first number corresponding to the current first time window, or if there is a second comparison result among the multiple second comparison results indicating that the current number of cluster resources of the target resource group is greater than or equal to the first number corresponding to the subsequent first time window in the multiple subsequent first time windows, then the first judgment result is that the target resource group does not need to be expanded.

6. The method according to claim 3, characterized in that Determining whether the target resource group needs to be scaled down based on the current number of cluster resources of the target resource group, the initial set of cluster resource numbers, and the second time window, where the second determination result includes: Acquire a second historical cluster resource quantity set, and form a second cluster resource quantity set according to the second historical cluster resource quantity set and the initial cluster resource quantity set; Determining, from the second cluster resource quantity set, a plurality of cluster resource quantities within a current second time window, and a plurality of cluster resource quantities within a plurality of subsequent second time windows of the current second time window, wherein the plurality of subsequent second time windows are obtained by updating the current second time window, and the number of the plurality of subsequent second time windows is greater than the number of the plurality of subsequent first time windows; Whether the target resource group needs to be scaled down is determined based on the current number of cluster resources of the target resource group, the number of multiple cluster resources in the current second time window, and the number of multiple cluster resources in the multiple subsequent second time windows to obtain the second determination result.

7. The method according to claim 6, characterized in that Determining whether the target resource group needs to be scaled down based on the current number of cluster resources of the target resource group, the number of multiple cluster resources in the current second time window, and the number of multiple cluster resources in the multiple subsequent second time windows, wherein the second judgment result includes: Determining a second quantity from the multiple quantities of cluster resources in the current second time window and the multiple quantities of cluster resources in the subsequent second time windows respectively, to obtain a second quantity corresponding to the current second time window and a second quantity corresponding to the subsequent second time window in the multiple subsequent second time windows, wherein the second quantity is greater than the first quantity; Comparing the current number of cluster resources of the target resource group with the second number corresponding to the current second time window to obtain a third comparison result, and respectively comparing the current number of cluster resources of the target resource group with the second numbers corresponding to subsequent second time windows in the multiple subsequent second time windows to obtain multiple fourth comparison results; If the third comparison result indicates that the current number of cluster resources of the target resource group is greater than the second number corresponding to the current second time window, and the multiple fourth comparison results all indicate that the current number of cluster resources of the target resource group is greater than the second number corresponding to the subsequent second time window in the multiple subsequent second time windows, then the target resource group needs to be scaled down as the second judgment result; If the third comparison result indicates that the current number of cluster resources of the target resource group is less than or equal to the second number corresponding to the current second time window, or if there is a fourth comparison result among the multiple fourth comparison results indicating that the current number of cluster resources of the target resource group is less than or equal to the second number corresponding to the subsequent second time window in the multiple subsequent second time windows, then the second judgment result is that the target resource group does not need to be scaled down.

8. The method according to claim 1, characterized in that The target time series prediction model is generated in the following way: Before the prediction cycle begins, target time series data of the target resource group is obtained, wherein the target time series data is composed of performance indicator data of multiple historical time points; The initial time series prediction model is retrained according to the target time series data to obtain the target time series prediction model.

9. The method according to claim 8, characterized in that After obtaining the target time series prediction model, the method further includes: When the prediction period begins, obtaining performance indicator data within a period time period corresponding to the prediction period; The target time series prediction model performs time series prediction calculation based on the performance indicator data within the periodic time period to obtain the predicted performance indicator data, wherein the predicted performance indicator data includes predicted values ​​of performance indicator data at multiple time points in the future.

10. The method according to claim 1, characterized in that If the target judgment result is that the target resource group needs to be expanded or reduced, then the cluster resource expansion or reduction processing of the target resource group includes: If the target judgment result is that the target resource group needs to be expanded, then obtaining target indicator information of the target component, and determining whether to expand the cluster resources of the target resource group based on the target indicator information, wherein the target indicator information is used to indicate whether the target component is in an available state; If the target judgment result is that the target resource group needs to be scaled down, the cluster resources of the target resource group are scaled down according to the target second quantity to reduce the current cluster quantity of the target resource group.

11. The method according to claim 10, characterized in that Determining whether to expand the cluster resources of the target resource group according to the target indicator information includes: If the target indicator information indicates that the target component is in an available state, then expanding the cluster resources of the target resource group according to the target first quantity to increase the current cluster quantity of the target resource group; If the target indicator information indicates that the target component is not in an available state, the cluster resources of the target resource group are not expanded.

12. The method according to claim 1, characterized in that After obtaining the target performance indicator data of the target resource group, the method further includes: If the predicted performance indicator data does not exist in the target performance indicator data, or the target judgment result is that the target resource group does not need scaling, then the target resource group is judged whether it needs scaling based on the real-time performance indicator data in the target performance indicator data and the target time window to obtain a third judgment result.

13. A cluster resource processing system, characterized in that: include: An indicator collection module, configured to collect indicator data of target performance indicators of cluster resources of a target resource group in real time and store the indicator data of the target performance indicators; A time series prediction module is configured to retrain an initial time series prediction model based on the target time series data obtained from the indicator acquisition module before a prediction period begins to obtain a target time series prediction model; when the prediction period begins, perform time series prediction calculations using the target time series prediction model to obtain prediction performance indicator data; and transmit the prediction performance indicator data to the indicator acquisition module, wherein the target time series data is composed of performance indicator data at multiple historical time points; a decision module, configured to determine whether the target resource group needs to be scaled up or down based on the target performance indicator data and the target time window obtained from the indicator collection module, obtain a target determination result, and transmit the target determination result to the controller, wherein the target performance indicator data includes at least one of the following: predicted performance indicator data and real-time performance indicator data; The controller is configured to determine a target cluster resource quantity based on the target determination result, and increase or decrease cluster resources of the target resource group according to the target cluster resource quantity.

14. A cluster resource processing device, characterized in that: include: an acquiring unit, configured to acquire target performance indicator data of a target resource group, wherein the target resource group is composed of at least one cluster resource, and the target performance indicator data is used to characterize usage of the cluster resource of the target resource group; a judgment unit, configured to, if the target performance indicator data includes predicted performance indicator data, determine whether the target resource group needs to be scaled up or down based on the predicted performance indicator data and a target time window, and obtain a target judgment result, wherein the predicted performance indicator data is obtained by performing time series prediction in advance using a target time series prediction model, and the target time window is a continuous time period consisting of a start and an end time point; The processing unit is configured to perform scaling processing on the cluster resources of the target resource group if the target judgment result is that the target resource group needs scaling processing.

15. An electronic device, characterized in that: include: a memory storing an executable program; A processor is configured to run the program, wherein the program, when running, executes the cluster resource processing method according to any one of claims 1 to 12.

16. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the storage medium is located is controlled to execute the cluster resource processing method according to any one of claims 1 to 12.

17. A computer program product, characterized in that The invention comprises a computer program, which implements the cluster resource processing method according to any one of claims 1 to 12 when being executed by a processor.