Soft load balancing cluster capacity expansion method and device

By using a pre-trained cluster expansion prediction model for soft load balancing cluster expansion prediction, the problem of insufficient reliance on manual experience and automation level in the existing technology is solved, and efficient and accurate cluster management and expansion is achieved.

CN119987988APending Publication Date: 2025-05-13INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410611331.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing soft load balancing clusters rely on manual experience, insufficient standardization and insufficient automation level in capacity expansion, resulting in complex expansion processes, long time and inability to achieve rapid automatic expansion.

Method used

By using a pre-trained cluster expansion prediction model, the capacity expansion prediction is carried out based on the performance vector of the soft load balancing cluster, and the server and configuration cluster information are automatically applied to achieve automatic capacity expansion of the cluster.

Benefits of technology

It improves the management efficiency and accuracy of the soft load balancing server cluster, realizes early warning and automatic capacity expansion, reduces manual operation costs, and improves the stability and reliability of the cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987988A_ABST
    Figure CN119987988A_ABST
Patent Text Reader

Abstract

The invention provides a soft load balancing cluster capacity expansion method and device which can be used in the field of artificial intelligence or other fields, and the method comprises the steps: predicting whether a soft load balancing cluster needs to be expanded or not according to an obtained performance vector of the soft load balancing cluster and a pre-trained cluster capacity expansion prediction model, and obtaining a prediction result; sending the prediction result to a user side and receiving a capacity expansion result fed back by the user side according to the prediction result; if the capacity expansion result is capacity expansion confirmation, a corresponding capacity expansion strategy is matched according to the obtained cluster information, and a server is applied for the soft load balancing cluster; and configuring the server according to the cluster information, and updating the cluster information after the configuration of the server is completed. According to the soft load balancing cluster expansion method and device provided by the invention, whether the cluster needs to be expanded or not is predicted, the cluster is automatically expanded, and the efficiency and accuracy of managing the soft load balancing server cluster are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method and device for expanding a soft load balancing cluster. Background Art

[0002] Due to the high cost and inability to quickly expand capacity of traditional hardware load balancing products, a large number of companies have conducted research and use of soft load balancing, using soft load balancing to support applications and achieve load balancing at the fourth and seventh layers (transport layer and application layer).

[0003] In the process of promoting and using soft load balancing, although the capacity of the soft load balancing cluster can be expanded by building more servers, there are two difficulties. First, since there are many soft load balancing clusters and they are oriented to different usage scenarios, whether the soft load balancing cluster needs to be expanded is generally triggered by monitoring alarms or relevant application managers based on demand feedback, which relies on manual experience, lacks standardization, and is often triggered after a problem occurs, and the triggering time node is relatively late; second, after confirming the need to initiate cluster expansion, cluster expansion needs to be carried out through manpower, including application professionals applying for servers, system professionals installing operating systems, etc., application professionals installing soft load balancing application versions, updating configuration management system ledgers, and updating cluster information to the soft load balancing management platform, etc. The expansion process involves multiple departments and the level of automation is insufficient, the process time is long, and rapid and automatic expansion cannot be achieved. Summary of the invention

[0004] In view of the problems in the prior art, the embodiments of the present application provide a method and device for expanding the capacity of a soft load balancing cluster, which can at least partially solve the problems in the prior art.

[0005] In a first aspect, the present application provides a method for expanding a soft load balancing cluster, comprising:

[0006] Predicting whether the soft load balancing cluster needs to be expanded based on the acquired performance vector of the soft load balancing cluster and a pre-trained cluster expansion prediction model to obtain a prediction result;

[0007] Sending the prediction result to the user terminal and receiving the expansion result fed back by the user terminal according to the prediction result;

[0008] If the expansion result is confirmed, matching the corresponding expansion strategy according to the acquired cluster information to apply for a server for the soft load balancing cluster;

[0009] The server is configured according to the cluster information and the cluster information is updated after the server configuration is completed.

[0010] Furthermore, the step of pre-training the cluster expansion prediction model includes:

[0011] Preprocess the obtained cluster expansion sample data set;

[0012] Divide the preprocessed cluster expansion sample data set into a training set and a test set;

[0013] The training set and the test set are used to perform model training to obtain the cluster expansion prediction model.

[0014] Furthermore, the model training is performed using the training set and the test set to obtain a cluster expansion prediction model, including:

[0015] Randomly resampling the training set to obtain multiple input sample sets;

[0016] Using the multiple input sample sets to perform model training respectively to obtain multiple decision tree models;

[0017] Obtaining the cluster expansion prediction model according to the multiple decision tree models;

[0018] The recognition rate of the cluster expansion prediction model is generated by using the test set, and the above operation is iteratively performed until the recognition rate reaches a preset threshold.

[0019] Further, matching a corresponding expansion strategy according to the acquired cluster information to apply for a server for the soft load balancing cluster includes:

[0020] Determine application information of the soft load balancing cluster according to the cluster information;

[0021] Matching a corresponding capacity expansion strategy from a preset capacity expansion strategy set according to the application information;

[0022] Apply for a server for the soft load balancing cluster according to the matched expansion strategy.

[0023] Further, the cluster information includes basic information and load balancing information; configuring the server according to the cluster information and updating the cluster information after the server configuration is completed, includes:

[0024] Installing a basic system for the server according to the basic information and updating the basic information after the basic system is installed on the server;

[0025] A soft load balancing management platform is installed for the server according to the load balancing information and configuration synchronization is performed, and the load balancing information is updated after configuration synchronization.

[0026] Furthermore, it also includes:

[0027] The cluster expansion prediction model is optimized according to the expansion result and the acquired artificial expansion information.

[0028] In a second aspect, the present application provides a soft load balancing cluster expansion device, comprising:

[0029] A cluster expansion prediction unit, used to predict whether the soft load balancing cluster needs to be expanded according to the acquired performance vector of the soft load balancing cluster and a pre-trained cluster expansion prediction model, and obtain a prediction result;

[0030] An expansion result receiving unit, used to send the prediction result to the user terminal and receive the expansion result fed back by the user terminal according to the prediction result;

[0031] A server application unit, configured to match a corresponding expansion strategy according to the acquired cluster information to apply for a server for the soft load balancing cluster if the expansion result is confirmed expansion;

[0032] A server configuration unit is used to configure the server according to the cluster information and update the cluster information after the server configuration is completed.

[0033] In a third aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any one of the above embodiments when executing the computer program.

[0034] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any of the above embodiments is implemented.

[0035] In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the method described in any of the above embodiments is implemented.

[0036] The soft load balancing cluster expansion method and device provided in the present application predict whether the soft load balancing cluster needs to be expanded according to the obtained performance vector of the soft load balancing cluster and the pre-trained cluster expansion prediction model to obtain a prediction result; send the prediction result to the user end and receive the expansion result fed back by the user end according to the prediction result; if the expansion result is to confirm the expansion, match the corresponding expansion strategy according to the obtained cluster information to apply for a server for the soft load balancing cluster; configure the server according to the cluster information and update the cluster information after the server configuration is completed, thereby realizing the prediction of whether the cluster needs to be expanded and automatically expanding the cluster, thereby improving the efficiency and accuracy of managing the soft load balancing server cluster.

[0037] Among them, by predicting whether the soft load balancing cluster needs to be expanded according to the performance vector of the acquired soft load balancing cluster and the pre-trained cluster expansion prediction model, early warning is achieved and production operation problems caused by insufficient performance are avoided, effectively improving the stability and reliability of the cluster; if the expansion result is confirmed expansion, the corresponding expansion strategy is matched according to the acquired cluster information to apply for the server for the soft load balancing cluster, and the server system installation, application version installation, configuration synchronization and information update of the associated system are realized automatically, reducing the manual operation cost, improving the management efficiency, and making the operation and maintenance of the server cluster more convenient and efficient; by configuring the server according to the cluster information and updating the cluster information after the server configuration is completed, the time and cost of cluster installation and expansion are reduced. In addition, the expansion method provided by this application is not only applicable to the automatic expansion management of the soft load balancing cluster of each enterprise, but also has reference significance for the automatic expansion and batch management of various distributed support applications, has a wide range of application and practicality, and is also applicable in the production cluster construction and emergency expansion scenarios, improving the cluster's resilience and flexibility. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0039] Figure 1 It is a flowchart of a method for expanding a soft load balancing cluster provided in an embodiment of the present application;

[0040] Figure 2 It is a flowchart of a method for expanding a soft load balancing cluster provided in an embodiment of the present application;

[0041] Figure 3 It is a flowchart of a method for expanding a soft load balancing cluster provided in an embodiment of the present application;

[0042] Figure 4 It is a flowchart of a method for expanding a soft load balancing cluster provided in an embodiment of the present application;

[0043] Figure 5 It is a flowchart of a method for expanding a soft load balancing cluster provided in an embodiment of the present application;

[0044] Figure 6 It is a structural diagram of a soft load balancing cluster expansion device provided in an embodiment of the present application;

[0045] Figure 7 It is a structural diagram of a soft load balancing cluster expansion device provided in an embodiment of the present application;

[0046] Figure 8 It is a structural diagram of a soft load balancing cluster expansion device provided in an embodiment of the present application;

[0047] Fig. 9 It is a structural diagram of a soft load balancing cluster expansion device provided in an embodiment of the present application;

[0048] Fig.10 It is a structural diagram of a soft load balancing cluster expansion device provided in an embodiment of the present application;

[0049] Fig.11 It is a structural diagram of a soft load balancing cluster expansion device provided in an embodiment of the present application;

[0050] Fig.12 is a schematic diagram of the physical structure of an electronic device provided in one embodiment of the present application;

[0051] Fig.13 It is a schematic diagram of a soft load balancing cluster expansion scenario provided by an embodiment of the present application;

[0052] Fig.14 The figure is a schematic diagram of the automatic capacity expansion process provided by an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Here, the illustrative embodiments of the present application and their descriptions are used to explain the present application, but are not intended to limit the present application. It should be noted that, in the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined arbitrarily with each other.

[0054] It should be noted that the soft load balancing cluster expansion method and device disclosed in the present application can be used in the field of artificial intelligence technology, and can also be used in any field other than the field of artificial intelligence technology. The application field of the soft load balancing cluster expansion method and device disclosed in the present application is not limited.

[0055] The following examples illustrate the scenarios of the embodiments of the present application, but the present application is not limited thereto.

[0056] Fig.13 is a schematic diagram of a soft load balancing cluster expansion scenario provided by an embodiment of the present application, such as Fig.13 As shown, the soft load balancing cluster expansion scenario may include a backend server 1301, a user terminal 1302, and a soft load balancing server cluster 1303. For simplicity, Fig.13Only one backend server 1301, one client 1302 and one soft load balancing server cluster 1303 are taken as an example for description, but the present application is not limited thereto.

[0057] In one embodiment, the soft load balancing server cluster 1303 may include multiple cluster servers, but the present application is not limited thereto.

[0058] In one embodiment, information exchange can be performed between the background server 1301 and the soft load balancing server cluster 1303. For example, the background server 1301 is used to manage the cluster configuration information of the soft load balancing server cluster 1303 (for example, including cluster basic configuration information and cluster load balancing configuration information), and receive the performance vector of the soft load balancing server cluster 1303 to predict whether the soft load balancing server cluster 1303 needs to be expanded, but the present application is not limited to this.

[0059] In one embodiment, information exchange can be performed between the background server 1301 and the user terminal 1302. For example, the background server 1301 sends a prediction result of whether the soft load balancing server cluster 1303 needs to be expanded to the user terminal 1302 and receives the final expansion decision fed back by the user terminal 1302, but the present application is not limited to this.

[0060] The following uses the background server as an example of the execution subject to illustrate the specific implementation process of the soft load balancing cluster expansion method provided in the embodiment of the present application.

[0061] Figure 1 FIG. 1 is a flow chart of a method for expanding a soft load balancing cluster provided in an embodiment of the present application. Figure 1 As shown, the soft load balancing cluster expansion method provided by this application includes:

[0062] S101: predicting whether the soft load balancing cluster needs to be expanded according to the acquired performance vector of the soft load balancing cluster and a pre-trained cluster expansion prediction model, and obtaining a prediction result;

[0063] S102: sending the prediction result to the user terminal and receiving the expansion result fed back by the user terminal according to the prediction result;

[0064] S103: If the expansion result is confirmed, matching a corresponding expansion strategy according to the acquired cluster information to apply for a server for the soft load balancing cluster;

[0065] S104: Configure the server according to the cluster information and update the cluster information after the server configuration is completed.

[0066] from Figure 1It can be seen from the process shown that the soft load balancing cluster expansion method provided in the present application predicts whether the soft load balancing cluster needs to be expanded based on the obtained performance vector of the soft load balancing cluster and the pre-trained cluster expansion prediction model to obtain a prediction result; sends the prediction result to the user end and receives the expansion result fed back by the user end based on the prediction result; if the expansion result is to confirm the expansion, matches the corresponding expansion strategy according to the obtained cluster information to apply for a server for the soft load balancing cluster; configures the server according to the cluster information and updates the cluster information after the server configuration is completed, thereby realizing the prediction of whether the cluster needs to be expanded and automatically expanding the cluster, thereby improving the efficiency and accuracy of managing the soft load balancing server cluster.

[0067] Each step is explained in detail below.

[0068] S101: predicting whether the soft load balancing cluster needs to be expanded according to the acquired performance vector of the soft load balancing cluster and a pre-trained cluster expansion prediction model, and obtaining a prediction result;

[0069] Specifically, the backend server obtains the daily operation and maintenance monitoring data (performance vector) of the soft load balancing server cluster, and inputs the pre-trained cluster expansion prediction model after statistical analysis to obtain the prediction result of whether the soft load balancing server cluster needs to be expanded, automatically discovers the cluster information that needs to be expanded, and can automatically predict the expansion needs to further determine the expansion decision, timely discover the cluster expansion needs and avoid unnecessary resource waste and operational risks. The daily operation and maintenance monitoring data (performance vector) includes the number of requests per second, the number of transactions per second, the number of new connections per second, and the current number of concurrent connections.

[0070] Figure 2 FIG. 1 is a flow chart of a method for expanding a soft load balancing cluster provided in an embodiment of the present application. Figure 2 As shown, the steps of pre-training the cluster expansion prediction model include:

[0071] S201: preprocessing the obtained cluster expansion sample data set;

[0072] Specifically, the background server needs to perform a series of preprocessing steps on the obtained cluster expansion sample data set in order to provide an accurate data basis for the training of the cluster expansion prediction model. Considering that the soft load balancing cluster is divided into a public cluster shared by multiple applications and an independent cluster used by a certain application alone, the preparation of the sample set and the subsequent training are divided into two cases: the public cluster and the independent cluster. Based on the historical operation and maintenance monitoring data and the basic configuration information of the cluster, the background server generates two types of samples: samples that need to be expanded are marked as 1 (positive samples), and samples that do not need to be expanded are marked as -1 (negative samples).

[0073] Among them, the characteristics of the sample set include the park to which it belongs, the current number of cluster devices, the operating system version, the network area, the number of requests per second, the number of transactions per second, the number of new connections per second, the current number of concurrent connections, CPU (cores), memory (G) and storage utilization, etc.

[0074] The backend server converts and normalizes the cluster expansion sample data set to ensure data consistency and comparability. It standardizes or normalizes numerical features to keep them in a similar numerical range to avoid certain features from having too much impact on model training, and encodes categorical features (such as the park, operating system version, and network area).

[0075] In one embodiment, the background server codes the park to which the cluster belongs as 1, 2, 3 according to different geographical locations, codes the operating system as 1, 2, 3, 4 according to different versions, and codes the network area as 1, 2, 3, etc. according to different regions.

[0076] Through the above preprocessing steps, the cluster expansion sample data set can be effectively prepared, providing a reliable data basis for the training of the cluster expansion prediction model, thereby achieving accurate prediction of whether the soft load balancing cluster needs to be expanded.

[0077] S202: dividing the preprocessed cluster expansion sample data set into a training set and a test set;

[0078] Specifically, the background server divides the preprocessed cluster expansion sample data set into training sets and test sets according to a certain ratio. When dividing, it should ensure that the samples of the training set and the test set are evenly distributed to ensure the generalization ability of the model on different data sets. It is also necessary to consider the distribution of positive and negative samples to ensure that both the training set and the test set contain a sufficient number of positive and negative samples to maintain data balance.

[0079] In one embodiment, the background server may adopt a random sampling method to randomly select samples from the cluster expansion sample data set and distribute them to the training set and the test set according to a certain ratio.

[0080] In one embodiment, the ratio of data division for the cluster expansion sample data set can be preset manually. For example, the preprocessed cluster expansion sample data set is divided into a training set and a test set in a ratio of 8:2, that is, 80% of the samples will be used to train the model and 20% of the samples will be used to test the model.

[0081] In one embodiment, each sample may be numbered or labeled when data is divided to ensure that the same sample does not appear repeatedly in the training set and the test set.

[0082] Through the above data partitioning method, the preprocessed cluster expansion sample data set can be divided into a training set and a test set, providing a reliable data foundation for the subsequent training and evaluation of the random forest classifier, to ensure that the model learns appropriate rules on the training set and generalizes on the test set, thereby evaluating the performance and accuracy of the model.

[0083] S203: Perform model training using the training set and the test set to obtain the cluster expansion prediction model.

[0084] Specifically, after the background server divides the cluster expansion sample data set into a training set and a test set, it uses the training set and the test set to train the model to obtain a cluster expansion prediction model. The cluster expansion prediction model is composed of multiple diverse decision trees, which aims to improve the prediction accuracy and has a good application effect in the practice of cluster automatic expansion prediction.

[0085] In one embodiment, the background server may use a random forest algorithm to perform model training to obtain the cluster expansion prediction model.

[0086] In one embodiment, the backend server generates an importance ranking of features using a cluster expansion prediction model to provide a reference for subsequent manual judgment and help determine which features are most influential in predicting cluster expansion needs.

[0087] Figure 3 FIG. 1 is a flow chart of a method for expanding a soft load balancing cluster provided in an embodiment of the present application. Figure 3 As shown, S203 includes:

[0088] S301: Randomly resample the training set to obtain multiple input sample sets;

[0089] Specifically, in order for each decision tree to learn based on different training data, the backend server first randomly samples and replaces the training set multiple times, thereby "inflating" the amount of training data, so that each decision tree can learn the characteristics and rules of the data based on different training samples. Based on the training data set, the backend server uses N times of random resampling with replacement to form multiple new input sample sets.

[0090] In each resampling, the backend server randomly extracts the same number of samples from the training set and allows repeated sampling. Through N random resampling, the backend server obtains multiple input sample sets, each of which is formed based on a different combination of the original training data set. This diverse training data set provides a different training perspective for each decision tree, which helps improve the generalization ability and prediction accuracy of the model.

[0091] In addition, due to the use of replacement, some samples may be drawn multiple times, while other samples may not be drawn at all. The out-of-bag data set formed by the undrawn samples can also be used to evaluate the generalization performance of the model to verify the prediction effect of the model on unseen data.

[0092] In one embodiment, the backend server may use the Bootstrap method to randomly resample the training set to obtain multiple input sample sets.

[0093] S302: Perform model training using the multiple input sample sets to obtain multiple decision tree models;

[0094] Specifically, for each input sample set, the backend server trains an independent decision tree. In this process, the backend server first randomly selects some feature values ​​from the input sample set and uses these feature values ​​to train the decision tree model. The purpose of this is to ensure that each decision tree learns the laws of the data based on different feature subsets, and each decision tree can focus on different feature information in the data, thereby improving the diversity and generalization ability of the model. Each decision tree is trained to effectively classify the input data to meet the prediction needs of whether the soft load balancing server cluster needs to be expanded.

[0095] In one embodiment, the backend server uses CART (Classification and Regression Trees) algorithm to train the decision tree model.

[0096] S303: Obtaining the cluster expansion prediction model according to the multiple decision tree models;

[0097] Specifically, the backend server then resamples and trains the decision tree to generate multiple decision trees, which constitute the cluster expansion prediction model. Each decision tree is trained based on different training data and feature subsets, so it has a certain degree of independence and diversity.

[0098] When outputting the prediction results, the cluster expansion prediction model integrates the outputs of all decision trees based on majority voting and obtains the final classification results for practical applications of cluster automatic expansion prediction.

[0099] In one embodiment, the output result of a single decision tree model is 1 (capacity expansion) or -1 (no capacity expansion). The cluster capacity expansion prediction model integrates the output results of each decision tree model to obtain the ratio of the number of output results of capacity expansion to the total number of output results. If it is greater than 50%, the prediction result of the cluster capacity expansion prediction model is capacity expansion.

[0100] S304: Generate a recognition rate of the cluster expansion prediction model using the test set, and iterate the above operations until the recognition rate reaches a preset threshold.

[0101] Specifically, the backend server uses the test set to evaluate the recognition rate of the trained cluster expansion prediction model. During the evaluation process, the backend server inputs the samples in the test set into the trained model to verify the prediction accuracy of the model for unseen data. The training is considered complete only when the recognition rate reaches the preset threshold.

[0102] If the recognition rate does not reach the preset threshold, the background server will iteratively perform the above operations, that is, reuse the training set to generate a new cluster expansion prediction model and evaluate its recognition rate until the recognition rate reaches the preset threshold.

[0103] By iteratively executing operations, the backend server continuously optimizes and adjusts the model to ensure that it has high prediction accuracy and generalization ability. This ensures that the model has good performance in actual applications and can accurately predict the expansion needs of the cluster.

[0104] S102: sending the prediction result to the user terminal and receiving the expansion result fed back by the user terminal according to the prediction result;

[0105] Specifically, after obtaining the prediction results of the cluster expansion prediction model, the backend server sends the prediction results to the user end. After receiving the prediction results, the user end will show them to relevant professionals or decision makers to carefully review and evaluate the prediction results and decide whether to adopt the expansion suggestions. Through information interaction, professionals or decision makers can further analyze the prediction results, such as comparing existing resource conditions and considering other relevant factors. Depending on whether the professionals adopt the expansion suggestions, the user end sends feedback on the expansion results to the backend server.

[0106] Through the above steps, two-way communication of prediction results and expansion decisions is achieved between the background server and the user end, ensuring the flexibility and controllability of the cluster expansion management process.

[0107] In one embodiment, the backend server uses a network communication protocol (such as HTTP, WebSocket, etc.) to transmit the prediction results to the application program on the user side to achieve information interaction.

[0108] In one embodiment, the feedback of the expansion result can be achieved by clicking a button on the user interface, submitting a form, or other interactive methods. The feedback of the expansion result includes options such as confirming the expansion and rejecting the expansion.

[0109] S103: If the expansion result is confirmed, matching a corresponding expansion strategy according to the acquired cluster information to apply for a server for the soft load balancing cluster;

[0110] Specifically, after receiving the expansion result sent by the user, the backend server will perform corresponding processing according to the feedback result. If the user confirms the expansion, the backend server will trigger the automatic expansion process, match the corresponding expansion strategy according to the acquired cluster information, and apply for a server for the soft load balancing cluster; if the user refuses to expand the capacity, the automatic expansion process will not be triggered, and the backend server will record this decision.

[0111] Figure 4 FIG. 1 is a flow chart of a method for expanding a soft load balancing cluster provided in an embodiment of the present application. Figure 4 As shown, S103 includes:

[0112] S401: Determine application information of the soft load balancing cluster according to the cluster information;

[0113] Specifically, based on the cluster basic configuration information of the configuration management system in the background server, the background server obtains various key information of the cluster, such as cluster name, application name, application service node, device type, brand, model, operating system, CPU, memory, hard disk specifications, network area and environment, etc., and determines the application information to determine the current cluster status and requirements.

[0114] S402: Matching a corresponding capacity expansion strategy from a preset capacity expansion strategy set according to the application information;

[0115] Specifically, after determining the application information, the background server will match the capacity expansion strategy. The preset capacity expansion strategy set includes two types of capacity expansion strategies: capacity expansion based on stock ratio and capacity expansion based on specified quantity. The background server matches the corresponding capacity expansion strategy based on the application information. Among them, the capacity expansion strategy can set specific values ​​according to the actual situation of different application nodes. If the application node has reached a certain set threshold, the background server can choose to expand according to the stock ratio according to the stock ratio expansion strategy; if the number of servers needs to be increased quickly, the background server can choose to expand according to the specified quantity.

[0116] S403: Apply for a server for the soft load balancing cluster according to the matched expansion strategy.

[0117] Specifically, once an applicable expansion strategy is matched, the backend server will initiate a cluster server application for the soft load balancing server cluster according to the strategy. The backend server will automatically process the cluster server application process according to the matched expansion strategy to ensure that the cluster expansion can be completed quickly and efficiently to meet the needs of the application.

[0118] S104: Configure the server according to the cluster information and update the cluster information after the server configuration is completed.

[0119] Specifically, the backend server configures the newly applied cluster server according to the cluster information, and updates the cluster information after the server configuration is completed, including configuring the server accordingly according to the cluster name, application name, network area, IP information, environment, operating system, etc. After the configuration is completed, the updated cluster information is synchronized to the backend server to ensure the timely update and consistency of the cluster information.

[0120] Figure 5 FIG. 1 is a flow chart of a method for expanding a soft load balancing cluster provided in an embodiment of the present application. Figure 5 As shown, S104 includes:

[0121] S501: Installing a basic system for the server according to the basic information and updating the basic information after the basic system is installed on the server;

[0122] Specifically, the background server installs the corresponding operating system, NTP, file system, AGENT, etc. for the newly applied cluster server according to the cluster basic configuration information of the configuration management system, and updates the cluster basic configuration information after the basic system is installed on the server, including updating the newly installed server information to the configuration management system.

[0123] S502: Install a soft load balancing management platform for the server according to the load balancing information and perform configuration synchronization, and update the load balancing information after configuration synchronization.

[0124] Specifically, the background server installs the soft load balancing management platform for the newly applied cluster server according to the cluster load balancing configuration information, and performs configuration synchronization. The background server receives the version installation package of the soft load balancing management platform through the interface, wherein there are multiple corresponding version installation policy tar packages for fields such as version number, main process version, operating system and agent version. The server automatically matches the version installation policy tar package of the corresponding version number in combination with cluster information (such as cluster name, application name, network area, IP information, environment, operating system, whether long connection, cluster identification, configuration template, main process version and agent version, etc.) to install the soft load balancing management platform through AGENT. After successful installation, obtain the cluster information and the configuration of the original server of the cluster, and perform configuration synchronization. After configuration synchronization, update the cluster load balancing configuration information.

[0125] In one embodiment, the soft load balancing cluster expansion method further includes:

[0126] The cluster expansion prediction model is optimized according to the expansion result and the acquired artificial expansion information.

[0127] Specifically, Fig.14 The figure shows a schematic flow chart of automatic expansion provided by an embodiment of the present application. It can be seen from the figure that in the process of realizing automatic expansion, the cluster expansion prediction model can also be optimized according to the expansion results decided by relevant personnel and the acquired artificial expansion information. The background server evaluates the prediction effect of the cluster expansion prediction model according to the actual situation of expansion adoption and the number of manually initiated expansions. The evaluation method is to use the number of clusters adopted by the expansion / (the total number of clusters predicted for expansion + the number of clusters manually initiated for expansion). Subsequently, the background server regularly increments the relevant cluster information of the manually initiated expansion to the training set to update the classifier in the expansion prediction model, and adjusts parameters such as the number of decision trees, the maximum depth of the tree, and the number of feature extractions for each tree, etc., to generate a classifier with better final effect.

[0128] The soft load balancing cluster expansion method provided in the present application predicts whether the soft load balancing cluster needs to be expanded according to the obtained performance vector of the soft load balancing cluster and the pre-trained cluster expansion prediction model to obtain a prediction result; sends the prediction result to the user end and receives the expansion result fed back by the user end according to the prediction result; if the expansion result is to confirm the expansion, matches the corresponding expansion strategy according to the obtained cluster information to apply for a server for the soft load balancing cluster; configures the server according to the cluster information and updates the cluster information after the server configuration is completed, thereby realizing the prediction of whether the cluster needs to be expanded and automatically expanding the cluster, thereby improving the efficiency and accuracy of managing the soft load balancing server cluster.

[0129] Among them, by predicting whether the soft load balancing cluster needs to be expanded according to the performance vector of the acquired soft load balancing cluster and the pre-trained cluster expansion prediction model, early warning is achieved and production operation problems caused by insufficient performance are avoided, effectively improving the stability and reliability of the cluster; if the expansion result is confirmed expansion, the corresponding expansion strategy is matched according to the acquired cluster information to apply for the server for the soft load balancing cluster, and the server system installation, application version installation, configuration synchronization and information update of the associated system are realized automatically, reducing the manual operation cost, improving the management efficiency, and making the operation and maintenance of the server cluster more convenient and efficient; by configuring the server according to the cluster information and updating the cluster information after the server configuration is completed, the time and cost of cluster installation and expansion are reduced. In addition, the expansion method provided by this application is not only applicable to the automatic expansion management of the soft load balancing cluster of each enterprise, but also has reference significance for the automatic expansion and batch management of various distributed support applications, has a wide range of application and practicality, and is also applicable in the production cluster construction and emergency expansion scenarios, improving the cluster's resilience and flexibility.

[0130] Based on the same inventive concept, the embodiments of the present application also provide a soft load balancing cluster expansion device, which can be used to implement the method described in the above embodiments, as described in the following embodiments. Since the principle of solving the problem by the soft load balancing cluster expansion device is similar to that of the soft load balancing cluster expansion method, the implementation of the soft load balancing cluster expansion device can refer to the implementation of the method based on software performance benchmark determination, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0131] Figure 6 is a structural diagram of a soft load balancing cluster expansion device provided in an embodiment of the present application, such as Figure 6 As shown, the device comprises:

[0132] The cluster expansion prediction unit 601 is used to predict whether the soft load balancing cluster needs to be expanded according to the acquired performance vector of the soft load balancing cluster and the pre-trained cluster expansion prediction model to obtain a prediction result;

[0133] Specifically, the cluster expansion prediction unit 601 obtains the daily operation and maintenance monitoring data (performance vector) of the soft load balancing server cluster, and inputs the pre-trained cluster expansion prediction model after statistical analysis to obtain the prediction result of whether the soft load balancing server cluster needs to be expanded, automatically discovers the cluster information that needs to be expanded, and can automatically predict the expansion needs to further determine the expansion decision, timely discover the cluster expansion needs and avoid unnecessary resource waste and operational risks. The daily operation and maintenance monitoring data (performance vector) includes the number of requests per second, the number of transactions per second, the number of new connections per second, and the current number of concurrent connections.

[0134] The expansion result receiving unit 602 is used to send the prediction result to the user terminal and receive the expansion result fed back by the user terminal according to the prediction result;

[0135] Specifically, after obtaining the prediction result of the cluster expansion prediction model, the expansion result receiving unit 602 sends the prediction result to the user end. After receiving the prediction result, the user end will show it to the relevant professionals or decision makers to carefully review and evaluate the prediction result and decide whether to adopt the expansion suggestion. Through information interaction, the professionals or decision makers can further analyze the prediction result, such as comparing the existing resource situation and considering other relevant factors. According to whether the professionals adopt the expansion suggestion, the user end sends feedback of the expansion result to the expansion result receiving unit 602.

[0136] Through the above steps, two-way communication of prediction results and expansion decisions is achieved between the background server and the user end, ensuring the flexibility and controllability of the cluster expansion management process.

[0137] The server application unit 603 is used to match the corresponding expansion strategy according to the acquired cluster information to apply for a server for the soft load balancing cluster if the expansion result is confirmed.

[0138] Specifically, after receiving the expansion result sent by the user, the server application unit 603 will perform corresponding processing according to the feedback result. If the user confirms the expansion, the server application unit 603 will trigger the automatic expansion process, match the corresponding expansion strategy according to the acquired cluster information, and apply for a server for the soft load balancing cluster; if the user refuses to expand the capacity, the automatic expansion process will not be triggered, and the decision will be recorded.

[0139] The server configuration unit 604 is used to configure the server according to the cluster information and update the cluster information after the server configuration is completed.

[0140] Specifically, the server configuration unit 604 configures the newly applied cluster server according to the cluster information, and updates the cluster information after the server configuration is completed, including configuring the server accordingly according to the cluster name, application name, network area, IP information, environment, operating system, etc. After the configuration is completed, the updated cluster information is synchronized to the server configuration unit 604 to ensure timely update and consistency of the cluster information.

[0141] Figure 7 is a schematic diagram of the structure of a soft load balancing cluster expansion device provided in an embodiment of the present application. Figure 6 Based on the embodiment, further, Figure 7 As shown, the soft load balancing cluster expansion device provided by the present application also includes:

[0142] A data preprocessing unit 701 is used to preprocess the obtained cluster expansion sample data set;

[0143] A data partitioning unit 702 is used to partition the preprocessed cluster expansion sample data set to obtain a training set and a test set;

[0144] The model training unit 703 is used to perform model training using the training set and the test set to obtain the cluster expansion prediction model.

[0145] Figure 8 is a schematic diagram of the structure of a soft load balancing cluster expansion device provided in an embodiment of the present application. Figure 7 Based on the embodiment, further, Figure 8 As shown, the soft load balancing cluster expansion device provided by the present application also includes:

[0146] A data resampling module 801 is used to randomly resample the training set to obtain multiple input sample sets;

[0147] A model training module 802 is used to perform model training using the multiple input sample sets to obtain multiple decision tree models;

[0148] A cluster expansion prediction model generation module 803 is used to obtain the cluster expansion prediction model according to the multiple decision tree models;

[0149] The iterative operation module 804 is used to generate the recognition rate of the cluster expansion prediction model using the test set, and iteratively perform the above operations until the recognition rate reaches a preset threshold.

[0150] Fig. 9 is a schematic diagram of the structure of a soft load balancing cluster expansion device provided in an embodiment of the present application. Figure 6 Based on the embodiment, further, Fig. 9 As shown, the soft load balancing cluster expansion device provided by the present application also includes:

[0151] An application information confirmation module 901 is used to determine the application information of the soft load balancing cluster according to the cluster information;

[0152] An expansion strategy matching module 902 is used to match a corresponding expansion strategy from a preset expansion strategy set according to the application information;

[0153] The server application module 903 is used to apply for a server for the soft load balancing cluster according to the matched expansion strategy.

[0154] Fig.10 is a schematic diagram of the structure of a soft load balancing cluster expansion device provided in an embodiment of the present application. Figure 6 Based on the embodiment, further, Fig.10 As shown, the soft load balancing cluster expansion device provided by the present application also includes:

[0155] The first server configuration module 1001 is used to install a basic system for the server according to the basic information and update the basic information after the basic system is installed on the server;

[0156] The second server configuration module 1002 is used to install a soft load balancing management platform for the server according to the load balancing information and perform configuration synchronization, and update the load balancing information after configuration synchronization.

[0157] Fig.11 is a schematic diagram of the structure of a soft load balancing cluster expansion device provided in an embodiment of the present application. Figure 6 Based on the embodiment, further, Fig.11 As shown, the soft load balancing cluster expansion device provided by the present application also includes:

[0158] The cluster expansion prediction model optimization unit 1101 is used to optimize the cluster expansion prediction model according to the expansion result and the acquired artificial expansion information.

[0159] The soft load balancing cluster expansion method and device provided in the present application predict whether the soft load balancing cluster needs to be expanded according to the obtained performance vector of the soft load balancing cluster and the pre-trained cluster expansion prediction model to obtain a prediction result; send the prediction result to the user end and receive the expansion result fed back by the user end according to the prediction result; if the expansion result is to confirm the expansion, match the corresponding expansion strategy according to the obtained cluster information to apply for a server for the soft load balancing cluster; configure the server according to the cluster information and update the cluster information after the server configuration is completed, thereby realizing the prediction of whether the cluster needs to be expanded and automatically expanding the cluster, thereby improving the efficiency and accuracy of managing the soft load balancing server cluster.

[0160] Among them, by predicting whether the soft load balancing cluster needs to be expanded according to the performance vector of the acquired soft load balancing cluster and the pre-trained cluster expansion prediction model, early warning is achieved and production operation problems caused by insufficient performance are avoided, effectively improving the stability and reliability of the cluster; if the expansion result is confirmed expansion, the corresponding expansion strategy is matched according to the acquired cluster information to apply for the server for the soft load balancing cluster, and the server system installation, application version installation, configuration synchronization and information update of the associated system are realized automatically, reducing the manual operation cost, improving the management efficiency, and making the operation and maintenance of the server cluster more convenient and efficient; by configuring the server according to the cluster information and updating the cluster information after the server configuration is completed, the time and cost of cluster installation and expansion are reduced. In addition, the expansion method provided by this application is not only applicable to the automatic expansion management of the soft load balancing cluster of each enterprise, but also has reference significance for the automatic expansion and batch management of various distributed support applications, has a wide range of application and practicality, and is also applicable in the production cluster construction and emergency expansion scenarios, improving the cluster's resilience and flexibility.

[0161] Fig.12 is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present application, such as Fig.12As shown, the electronic device may include: a processor 1201, a communication interface 1202, a memory 1203 and a communication bus 1204, wherein the processor 1201, the communication interface 1202 and the memory 1203 communicate with each other through the communication bus 1204. The processor 1201 may call the logic instructions in the memory 1203 to execute the following method: predict whether the soft load balancing cluster needs to be expanded according to the performance vector of the acquired soft load balancing cluster and the pre-trained cluster expansion prediction model, and obtain a prediction result; send the prediction result to the user end and receive the expansion result fed back by the user end according to the prediction result; if the expansion result is to confirm the expansion, match the corresponding expansion strategy according to the acquired cluster information to apply for a server for the soft load balancing cluster; configure the server according to the cluster information and update the cluster information after the server configuration is completed.

[0162] In addition, the logic instructions in the above-mentioned memory 1203 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0163] The present embodiment discloses a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments, for example, including: predicting whether the soft load balancing cluster needs to be expanded according to the obtained performance vector of the soft load balancing cluster and a pre-trained cluster expansion prediction model to obtain a prediction result; sending the prediction result to a user end and receiving the expansion result fed back by the user end according to the prediction result; if the expansion result is confirmation of expansion, matching the corresponding expansion strategy according to the obtained cluster information to apply for a server for the soft load balancing cluster; configuring the server according to the cluster information and updating the cluster information after the server configuration is completed.

[0164] The present embodiment provides a computer-readable storage medium, which stores a computer program. The computer program enables the computer to execute the methods provided by the above-mentioned method embodiments, for example, including: predicting whether the soft load balancing cluster needs to be expanded according to the obtained performance vector of the soft load balancing cluster and a pre-trained cluster expansion prediction model to obtain a prediction result; sending the prediction result to a user end and receiving the expansion result fed back by the user end according to the prediction result; if the expansion result is to confirm the expansion, matching the corresponding expansion strategy according to the obtained cluster information to apply for a server for the soft load balancing cluster; configuring the server according to the cluster information and updating the cluster information after the server configuration is completed.

[0165] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0166] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0167] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0169] In the description of this specification, the description with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0170] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A method for expanding a soft load balancing cluster, characterized in that: include: Predicting whether the soft load balancing cluster needs to be expanded based on the acquired performance vector of the soft load balancing cluster and a pre-trained cluster expansion prediction model to obtain a prediction result; Sending the prediction result to the user terminal and receiving the expansion result fed back by the user terminal according to the prediction result; If the expansion result is confirmed, matching the corresponding expansion strategy according to the acquired cluster information to apply for a server for the soft load balancing cluster; The server is configured according to the cluster information and the cluster information is updated after the server configuration is completed.

2. The method for expanding the soft load balancing cluster according to claim 1, characterized in that: The steps of pre-training the cluster expansion prediction model include: Preprocess the obtained cluster expansion sample data set; Divide the preprocessed cluster expansion sample data set into a training set and a test set; The training set and the test set are used to perform model training to obtain the cluster expansion prediction model.

3. The method for expanding the soft load balancing cluster according to claim 2, characterized in that: The method of using the training set and the test set to perform model training to obtain a cluster expansion prediction model includes: Randomly resampling the training set to obtain multiple input sample sets; Using the multiple input sample sets to perform model training respectively to obtain multiple decision tree models; Obtaining the cluster expansion prediction model according to the multiple decision tree models; The recognition rate of the cluster expansion prediction model is generated by using the test set, and the above operation is iteratively performed until the recognition rate reaches a preset threshold.

4. The method for expanding the soft load balancing cluster according to claim 1, characterized in that: The matching of the corresponding expansion strategy according to the acquired cluster information to apply for a server for the soft load balancing cluster includes: Determine application information of the soft load balancing cluster according to the cluster information; Matching a corresponding capacity expansion strategy from a preset capacity expansion strategy set according to the application information; Apply for a server for the soft load balancing cluster according to the matched expansion strategy.

5. The method for expanding the soft load balancing cluster according to claim 1, characterized in that: The cluster information includes basic information and load balancing information; configuring the server according to the cluster information and updating the cluster information after the server configuration is completed, includes: Installing a basic system for the server according to the basic information and updating the basic information after the basic system is installed on the server; A soft load balancing management platform is installed for the server according to the load balancing information and configuration synchronization is performed, and the load balancing information is updated after configuration synchronization.

6. The method for expanding the soft load balancing cluster according to claim 1, characterized in that: Also includes: The cluster expansion prediction model is optimized according to the expansion result and the acquired artificial expansion information.

7. A soft load balancing cluster expansion device, characterized in that: include: A cluster expansion prediction unit, used to predict whether the soft load balancing cluster needs to be expanded according to the acquired performance vector of the soft load balancing cluster and a pre-trained cluster expansion prediction model, and obtain a prediction result; An expansion result receiving unit, used to send the prediction result to the user terminal and receive the expansion result fed back by the user terminal according to the prediction result; A server application unit, configured to match a corresponding expansion strategy according to the acquired cluster information to apply for a server for the soft load balancing cluster if the expansion result is confirmed expansion; A server configuration unit is used to configure the server according to the cluster information and update the cluster information after the server configuration is completed.

8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.