Load balancing method and device for server cluster in high-concurrency scene

By identifying and predicting the access characteristics and resource information of the server cluster and dynamically adjusting the server resource configuration, the problems of low scaling efficiency and incompatibility of load balancing strategies in high-concurrency scenarios are solved, and stable and efficient processing of high-concurrency requests is achieved.

CN120658744APending Publication Date: 2025-09-16AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511059184.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

In high-concurrency scenarios, the scaling efficiency of server clusters is too low, and the load balancing strategy cannot adapt to service requests, resulting in insufficient utilization of server resources and unstable responses.

Method used

By receiving access service data to be processed from the server cluster, identifying application characteristics, historical access volume characteristics, predicted date characteristics and daily access volume ratio characteristics, scaling is performed, processing servers are determined, and load balancing is performed based on service request types and hardware resource information. The stacking prediction model is used to predict response time and dynamically adjust server resource configuration.

Benefits of technology

It improves the dynamic adjustment speed and load balancing distribution accuracy of server clusters in high-concurrency scenarios, improves the stability and efficiency of server clusters in handling high-concurrency requests, and solves the problems of low scaling efficiency and poor adaptability of load balancing strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658744A_ABST
    Figure CN120658744A_ABST
Patent Text Reader

Abstract

The invention discloses a load balancing method and device for a server cluster in a high-concurrency scene. The method is characterized by comprising the following steps: receiving to-be-processed access service data of a server cluster, and identifying an application feature, a historical access volume feature, a predicted date feature and a single-day access volume proportion feature corresponding to the access service data; based on the application features, the historical page view features, the predicted date features and the single-day page view proportion features, carrying out capacity expansion and shrinkage on the server cluster, and determining at least one processing server; under the condition that a service request corresponding to the access service data is received, service resource information corresponding to each processing server is acquired; and allocating a target server to the service request based on the request type corresponding to the service request and the hardware resource information of each processing server. According to the method, the page view is accurately predicted, the response strategy of the access request is adjusted, load distribution is carried out on the service request, and the load balancing capacity of a server cluster in a high-concurrency scene is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of server clusters, and in particular to a load balancing method and device for a server cluster in a high-concurrency scenario. Background Art

[0002] With the explosive growth in the number of users and the increasing complexity of applications, the traditional approach of using a single server to handle high-concurrency application requests is gradually experiencing bottlenecks in performance, throughput, and bandwidth. To ensure service stability and scalability, effectively distributing traffic across multiple servers has become a necessary strategy. Load balancing can distribute requests to the most appropriate server in a server cluster, enabling applications to quickly respond to and process user requests. However, with the prevalence of cloud-native technologies, dynamic scaling of application server resources has become a common method for addressing traffic fluctuations, optimizing resource utilization, and improving service performance. This technology enables applications to flexibly adjust server resource allocation. However, cloud-native technologies often experience a certain lag in dynamically scaling server resources, and the frequent changes in server resources make it difficult for traditional load balancing strategies to keep up with resource dynamics and adapt promptly. Summary of the Invention

[0003] The present invention provides a load balancing method and device for a server cluster in a high-concurrency scenario to solve the technical problems in the prior art that the expansion and contraction efficiency of a server cluster in a high-concurrency scenario is too low and the load balancing strategy cannot adapt to service requests.

[0004] According to one aspect of the present invention, a method for load balancing a server cluster in a high-concurrency scenario is provided, comprising:

[0005] Receive access service data to be processed by the server cluster, and identify application characteristics, historical visit volume characteristics, predicted date characteristics, and single-day visit volume ratio characteristics corresponding to the access service data;

[0006] Scaling the server cluster based on the application characteristics, the historical visit volume characteristics, the predicted date characteristics, and the single-day visit volume ratio characteristics, and determining at least one processing server;

[0007] Upon receiving a service request corresponding to the access service data, obtaining service resource information corresponding to each of the processing servers;

[0008] A target server is allocated to the service request based on the request type corresponding to the service request and the hardware resource information of each of the processing servers.

[0009] According to another aspect of the present invention, a load balancing device for a server cluster in a high-concurrency scenario is provided, comprising:

[0010] A data processing module is used to receive access service data to be processed by the server cluster, and identify application characteristics, historical visit volume characteristics, predicted date characteristics, and single-day visit volume ratio characteristics corresponding to the access service data;

[0011] A load prediction and allocation module, configured to scale the server cluster based on the application characteristics, the historical visit volume characteristics, the predicted date characteristics, and the single-day visit volume ratio characteristics, and determine at least one processing server;

[0012] A load resource processing module, configured to obtain service resource information corresponding to each of the processing servers upon receiving a service request corresponding to the access service data;

[0013] The load distribution module is used to allocate a target server to the service request based on the request type corresponding to the service request and the hardware resource information of each processing server.

[0014] According to another aspect of the present invention, an electronic device is provided, comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the load balancing method of the server cluster in the high concurrency scenario described in any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a processor to implement the load balancing method of a server cluster in a high-concurrency scenario described in any embodiment of the present invention when executed.

[0019] The technical solution of the embodiment of the present invention receives access service data to be processed by a server cluster, identifies the application characteristics, historical access volume characteristics, predicted date characteristics and single-day access volume ratio characteristics corresponding to the access service data, and pre-acquires the access service data to be processed, so as to make pre-adjustments based on the access volume, thereby improving the dynamic adjustment speed of the server cluster in high concurrency scenarios; scales the server cluster based on the application characteristics, historical access volume characteristics, predicted date characteristics and single-day access volume ratio characteristics, determines at least one processing server, and actively adapts to the access volume by pre-adjusting the processing servers of the server cluster, thereby improving the efficiency of scaling the server cluster; when receiving a service request corresponding to the access service data, obtains the service resource information corresponding to each of the processing servers, performs load balancing distribution for the service request based on the service resource information of the server, thereby improving the accuracy of load balancing distribution; and allocates a target server to the service request based on the request type corresponding to the service request and the hardware resource information of each of the processing servers. In high-concurrency scenarios, by pre-scaling the server cluster, dynamic load balancing is performed for high-concurrency service requests based on the scaled-up and scaled-down servers. This improves the accuracy of the load balancing strategy and the stability of the server cluster in handling high-concurrency service requests. This addresses the technical issues of low scaling efficiency of server clusters in high-concurrency scenarios and the inability of load balancing strategies to adapt to service requests in existing technologies. By accurately predicting the number of visits, the server cluster's response strategy to access can be adjusted in a timely manner, and service requests can be load-balanced based on server resources, improving the server cluster's load balancing capabilities in high-concurrency scenarios.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 The present invention provides a flow chart of a method for load balancing a server cluster in a high-concurrency scenario.

[0023] Figure 2 A flow chart of a method for load balancing a server cluster in a high-concurrency scenario provided by an embodiment of the present invention;

[0024] Figure 3 A flow chart of a method for load balancing a server cluster in a high-concurrency scenario provided by an embodiment of the present invention;

[0025] Figure 4 A schematic diagram of the structure of a load balancing device for a server cluster in a high-concurrency scenario provided by an embodiment of the present invention;

[0026] Figure 5 FIG. 1 is a schematic structural diagram of an electronic device 10 that can be used to implement an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] Figure 1 The present invention provides a flowchart of a method for load balancing a server cluster in a high-concurrency scenario. This embodiment is applicable to situations where a server cluster predicts access traffic and dynamically adjusts load balancing strategies in a high-concurrency access scenario. The method can be executed by a load balancing device for a server cluster in a high-concurrency scenario. The load balancing device for a server cluster in a high-concurrency scenario can be implemented in the form of hardware and / or software. The load balancing device for a server cluster in a high-concurrency scenario can be configured in an electronic device. Figure 1 As shown, the method includes:

[0030] S110: Receive access service data to be processed by a server cluster, and identify application characteristics, historical visit volume characteristics, predicted date characteristics, and daily visit volume ratio characteristics corresponding to the access service data.

[0031] Among them, the access service data can be relevant data of the service requests that the server cluster will need to process soon. It should be noted that the access service data can be basic data for predicting future time periods or future dates. Optionally, when the server cluster provides service requests for processing applications, the service requests of applications supported by the server cluster can be known in advance, and thus the access service data that the server cluster will need to process soon can be obtained in advance. For example, for example, the application is a game program, and the application is expected to launch a new version the next day. During the application version update, a large number of service requests will be received. Therefore, the server cluster can receive the access service data in advance as the next working day, and the application will be updated. Based on the above content, the server cluster can predict that a large number of service requests will be generated the next day.

[0032] The application feature can be the access type of the service request of the application. Optionally, the application feature can be set by the application itself. For example, when a shopping application is running a promotion, the application feature can be a marketing campaign identifier; when a gaming application is updating the game version, the application feature can be a version update identifier.

[0033] The historical visit volume features include the previous day's visit volume and the multi-day average visit volume. The previous day's visit volume can be the single-day visit volume of the day before the predicted date, and the multi-day average visit volume can be the average of the single-day visit volumes of all days before the predicted date. It should be noted that the server cluster can record daily single-day visit volumes. When performing visit volume prediction, the previous day's visit volume can be obtained and the average of all single-day visit volumes can be calculated to obtain the multi-day average visit volume.

[0034] The predicted date feature may be feature information of the date for which the application's service request traffic is predicted. It should be noted that the predicted date feature includes both date features and time segment features. The date feature may be the type of date, and the time segment features may be the time periods that make up each day. If the predicted date is a weekday, the predicted date feature is the weekday identifier; if the predicted date is a holiday, the predicted date feature is the holiday identifier. The time segment feature divides the weekday or holiday into three time periods: morning, afternoon, and evening. The morning period is four hours, the afternoon period is eight hours, and the evening period is 12 hours.

[0035] The single-day visit volume ratio feature may be the ratio of the visit volume of a complete day in the first N time periods before the time period to be predicted to the visit volume of the predicted day.

[0036] Specifically, when the server cluster has not yet received the service request of the application, the access service data corresponding to the service request to be processed by the server cluster is collected in advance, the access service data is identified, and the application characteristics, historical access volume characteristics, predicted date characteristics and single-day access volume ratio characteristics corresponding to the access service data are identified.

[0037] For example, the server cluster may collect access service data for the next day every day, for example, to conduct product marketing or version updates on the next day, and use the date feature of the next day as the date feature and the type of service request of the next day as the application feature.

[0038] S120 , scaling the server cluster based on the application characteristics, the historical page views characteristics, the predicted date characteristics, and the daily page views ratio characteristics, and determining at least one processing server.

[0039] The processing server may be a server in a server cluster that processes service requests corresponding to access service data. It should be noted that the processing server is a service computing node in the server cluster, and the server cluster dynamically selects a server as the corresponding processing server based on the number of visits corresponding to different access service data.

[0040] Optionally, in the present invention, after obtaining the application characteristics and predicted date characteristics of the server cluster to identify the access service data, the access volume is predicted based on the application characteristics, the historical access volume characteristics, the predicted date characteristics and the single-day access volume ratio characteristics, and the access volume prediction result corresponding to the access service data is predicted. Based on the access volume prediction result, the server cluster is expanded or reduced in capacity to match at least one processing server corresponding to the access volume.

[0041] Optionally, if the existing number of servers in the server cluster cannot meet the predicted results of the access volume of the access service data, the server cluster will automatically expand, increase the service computing nodes of the server cluster, and then allocate corresponding multiple processing servers for accessing the server data; if the existing number of servers in the server cluster can meet the predicted results of the access volume of the access service data, the server cluster will automatically reduce the service computing nodes for accessing the service data, and allocate one or more processing servers that meet the access volume to the access server data.

[0042] Optionally, a scaling policy is pre-configured in the server cluster so that when the server cluster determines the amount of traffic to be processed, it can automatically increase or decrease processing servers based on the scaling policy in real time, which can effectively reduce usage costs.

[0043] Optionally, when a server cluster automatically scales up or down based on a scaling policy, the server cluster can pre-increase or reduce servers based on the number of visits, or it can maintain the same number of servers and not scale the server cluster up or down. The server cluster pre-sets a scaling plan and execution time, and when the execution time arrives, the server cluster initiates the scaling plan to add or reduce servers. The execution time must meet the requirement that the server cluster completes automatic scaling before the predicted number of visits to the service data arrives.

[0044] Specifically, the server cluster is expanded or reduced based on the application characteristics, the historical visit volume characteristics, the predicted date characteristics, and the single-day visit volume ratio characteristics, and at least one processing server is determined.

[0045] S130: Upon receiving a service request corresponding to the access service data, obtain service resource information corresponding to each of the processing servers.

[0046] The service resource information may be the hardware configuration information of the processing server and the server's available resource information; the service resource information may be used to describe the server's ability to process service requests.

[0047] Optionally, the server's hardware configuration information refers to the hardware devices that make up the server, such as the server's CPU, memory capacity, hard disk capacity, and network bandwidth. The server's hardware configuration information directly determines the amount of tasks the server can handle and its processing power. The server's available resource information can be the current server load information, an indicator used to describe the server's load situation. The server's available resource information can reflect the server's operating status. The server's available resource information is typically composed of CPU unutilized rate, memory unutilized rate, disk IO unutilized rate, and network bandwidth unutilized rate. Specifically, upon receiving a service request corresponding to access service data, the service resource information corresponding to each processing server assigned to the server cluster is obtained.

[0048] S140: Allocate a target server for the service request based on the request type corresponding to the service request and the hardware resource information of each of the processing servers.

[0049] The request type may be information describing the type of service request accessing the server cluster. It should be noted that different service request types are targeted at different business types. Each request type represents a specific action, and each request type has different server resource requirements and response times. The server also responds differently to service requests of different request types. For example, request types may include transaction processing, data analysis, and data query.

[0050] Specifically, after receiving a service request, the server cluster identifies the request type of the service request, matches the request type corresponding to the service request with the hardware resource information of each processing server, and allocates a target server among all processing servers to process the service request.

[0051] The technical solution of the embodiment of the present invention receives access service data to be processed by a server cluster, identifies the application characteristics, historical access volume characteristics, predicted date characteristics and single-day access volume ratio characteristics corresponding to the access service data, and pre-acquires the access service data to be processed, so as to make pre-adjustments based on the access volume, thereby improving the dynamic adjustment speed of the server cluster in high concurrency scenarios; scales the server cluster based on the application characteristics, historical access volume characteristics, predicted date characteristics and single-day access volume ratio characteristics, determines at least one processing server, and actively adapts to the access volume by pre-adjusting the processing servers of the server cluster, thereby improving the efficiency of scaling the server cluster; when receiving a service request corresponding to the access service data, obtains the service resource information corresponding to each of the processing servers, performs load balancing distribution for the service request based on the service resource information of the server, thereby improving the accuracy of load balancing distribution; and allocates a target server to the service request based on the request type corresponding to the service request and the hardware resource information of each of the processing servers. In high-concurrency scenarios, by pre-scaling the server cluster, dynamic load balancing is performed for high-concurrency service requests based on the scaled-up and scaled-down servers. This improves the accuracy of the load balancing strategy and the stability of the server cluster in handling high-concurrency service requests. This addresses the technical issues of low scaling efficiency of server clusters in high-concurrency scenarios and the inability of load balancing strategies to adapt to service requests in existing technologies. By accurately predicting the number of visits, the server cluster's response strategy to access can be adjusted in a timely manner, and service requests can be load-balanced based on server resources, improving the server cluster's load balancing capabilities in high-concurrency scenarios.

[0052] Figure 2 This is a flow chart of a method for load balancing a server cluster in a high-concurrency scenario provided by an embodiment of the present invention. The relationship between this embodiment and the above embodiment specifically illustrates a method for allocating target servers for service requests to achieve load balancing of a server cluster. Figure 2 As shown, the method includes:

[0053] S210: Receive access service data to be processed by the server cluster, and identify application characteristics, historical visit volume characteristics, predicted date characteristics, and single-day visit volume ratio characteristics corresponding to the access service data.

[0054] S220 , scaling the server cluster based on the application characteristics, the historical page views characteristics, the predicted date characteristics, and the daily page views ratio characteristics, and determining at least one processing server.

[0055] S230: Upon receiving a service request corresponding to the access service data, obtain service resource information corresponding to each of the processing servers.

[0056] S240: For each of the processing servers, use the hardware resource information and the request type as response time prediction data.

[0057] The response time prediction data can be used to predict the response time of a processing server to a service request. Response time is the time taken by the processing server to respond to and process the entire service request, i.e., the time taken by the processing server to receive the service request, respond to the service request, and return the data corresponding to the service request. It should be noted that the present invention performs a separate processing time prediction for each processing server, taking into account the emergency resource information of each processing server and the request type of the service request.

[0058] Specifically, for each processing server, the hardware resource information of the processing server and the request type are combined to determine the response time prediction data corresponding to the processing server.

[0059] S250: Processing time prediction is performed on the response time prediction data using a pre-trained stack prediction model to determine a predicted response time.

[0060] The predicted response time may be the response time required for the predicted processing server to process the service request.

[0061] The stacked prediction model can be a model pre-trained based on ensemble learning and used to predict server processing of service requests. It should be noted that the stacked prediction model consists of at least one base learning model and a meta-learning model. The base learning model can be trained based on different types of base learners. The base learning model predicts response time prediction data. The results of each base learning model are combined and input into the meta-learning model, which outputs the predicted response time.

[0062] Optionally, during prediction, for each type of base learner, response time prediction data is predicted based on at least one base learning model corresponding to the base learner. Each base learning model obtains a prediction result, and the prediction results of all base learning models are averaged to obtain a final prediction result for each type of base learner. The final prediction results of each type of base learner are merged into a new feature set. After the new feature set is input into the meta-learning model, the meta-learning model outputs the predicted response time. Exemplarily, each type of base learner forms k base learning models during pre-training. The response time prediction data is independently predicted using the k base learning models to obtain K prediction results. The average of the K prediction results is used as the final prediction value of the base learner. The final prediction values ​​of all base learners are merged into a new feature set as input to the meta-learner. The meta-learning model uses the new feature set as input to obtain the predicted response time of the processing server.

[0063] Specifically, for each processing server, the response time prediction data corresponding to the processing server is input into a pre-trained stack prediction model, and the stack prediction model is used to predict the processing time of the response time prediction data to determine the predicted response time corresponding to the processing server.

[0064] Optionally, in another optional embodiment of the present invention, before performing processing time prediction on the response time prediction data using a pre-trained stacked prediction model to determine the predicted response time, the method further includes:

[0065] Record the processing record of each service request by the server cluster; wherein the processing record includes the server hardware configuration, available resource information, request type of the service request and server processing time for processing the service request; use each processing record as model training data to construct a model training data set; and perform model training on a pre-built stacking generalization model based on the model training data set to obtain a stacking prediction model.

[0066] The server processing time may be the processing time for the server to process the service request.

[0067] The model training data can be used to train the stacked prediction model. The model training data consists of server hardware configuration, available resource information, request type of service request, and server processing time.

[0068] Optionally, a training data set needs to be pre-built before training the stacked prediction model. Data is collected during the operation of the server cluster as training data. When the server cluster processes each service request, the server hardware configuration, available resource information, request type of the service request, and server processing time of the service request are recorded as a processing record, and the processing record is used as a model training data.

[0069] Optionally, the processing records are recorded as model training data in a pre-built model training set, and the collection of processing records for the server cluster is repeated until the size of the model training set can support the training of the stacked prediction model.

[0070] Among them, the stacked generalization model includes at least one type of base learner and meta-learner. The base learner can be based on at least one of decision tree, support vector machine, K nearest neighbor, random forest and extreme gradient boosting, and the meta-learner can be based on one of linear regression, logistic regression, support vector machine or neural network.

[0071] Specifically, the processing records of each service request of the server cluster are recorded; wherein the processing records include the server hardware configuration, available resource information, request type of the service request and server processing time for processing the service request; each processing record is used as model training data to construct a model training dataset; based on the model training dataset, the pre-built stacking generalization model is trained to obtain a stacking prediction model.

[0072] Optionally, in another optional embodiment of the present invention, the performing model training on a pre-built stacking generalization model based on the model training dataset to obtain a stacking prediction model includes:

[0073] Divide the model training data set into multiple training data subsets by random non-repeated sampling method;

[0074] For each type of the base learner, performing model training on the base learner based on the plurality of training data subsets, and determining at least one base learning model and a prediction verification result corresponding to each base learning model;

[0075] For each type of the base learner, merging the prediction verification results corresponding to each base learning model to determine the prediction result of the base learner;

[0076] The prediction results corresponding to all types of base learners are used as combined training data;

[0077] Performing model training on the meta-learner based on the combined training data to determine a meta-learning model;

[0078] When the prediction accuracy of the meta-learning model is greater than a preset accuracy threshold, the stacked generalization model is determined as the stacked prediction model.

[0079] Among them, the random non-repetitive sampling method is that when extracting data from the model training data set, the probability of selecting each model training data is the same, and the probability of each model training data being selected is one.

[0080] The training data subsets can be used as training data sets for training base learners; and the amount of model training data contained in each training data subset is the same.

[0081] Optionally, the training data subsets are divided based on a preset number of training data subsets by a random non-repetitive sampling method.

[0082] The prediction verification result may be a prediction result obtained by verifying a subset of training data using a trained base learning model.

[0083] Optionally, for each type of base learner of the stacked generalization model, model training is performed on the base learner based on multiple training data subsets, at least one base learning model is determined, and model verification is performed on each trained base learning model based on the training data subset to obtain a prediction verification result output by each base learning model.

[0084] Optionally, in another optional embodiment of the present invention, for each model training, a plurality of model training sets and a model validation set are randomly determined based on a plurality of the training data subsets;

[0085] The base learner is subjected to model training based on the multiple model training sets to determine at least one base learning model, and the base learning model is subjected to model verification through a model verification set to determine the prediction verification result.

[0086] Optionally, for each type of base learner, during each model training, a subset of the training data is selected from the training data subsets as the model validation set, and the remaining training data subsets are used as the model training set. The base learner is trained once using the entire model training set to obtain a base learning model. The base learning model is then model-validated based on the model validation set to determine the prediction validation result corresponding to the base learning model. The above process is repeated to complete the training of all base learners of that type.

[0087] Optionally, during training, if this is the first time that a base learner of this type is trained, the first training data subset is used as a model validation set, and the remaining training data subsets are used as model training sets to train the base learner; if this is the second time that a base learner of this type is trained, the second training data subset is used as a model validation set, and the remaining training data subsets are used as model training sets to train the base learner; if this is the third time that a base learner of this type is trained, the third training data subset is used as a model validation set, and the remaining training data subsets are used as model training sets to train the base learner; and so on, until the last training data subset is used as a model validation set, and the remaining training data subsets are used as model training sets to train the base learner. The number of base learning models is the same as the number of training data subsets. Exemplarily, the model training data set is divided into k training data subsets by a random non-repetitive sampling method, and K-1 training data subsets are selected to form a training set to train the base learner to obtain a base learning model. The remaining 1 subset is used as a model validation set to evaluate the model effect of the base learning model, and the above steps are repeated K times.

[0088] The prediction result may be a collection of prediction verification results of all base learning models corresponding to a type of base learner.

[0089] Optionally, for each type of base learner, the prediction verification results corresponding to each base learning model are combined to determine the prediction result of the base learner.

[0090] The merged training data may be training data for training a meta-learner.

[0091] Optionally, the prediction results corresponding to all types of base learners are merged to obtain merged training data, and the meta-learner is trained based on the merged training data to determine the meta-learning model.

[0092] The preset accuracy threshold may be a preset data value that is used to determine whether the processing time output by the meta-learning model meets the accuracy requirement. For example, the preset accuracy threshold may be set to 95%.

[0093] Optionally, the prediction accuracy can be used to determine the accuracy of the meta-learning model's predictions. This is done by validating the trained stacked generalization model against different model training data, determining whether the processing time of the meta-learning model's predictions is consistent with the server processing time of the model training data, and then calculating the meta-learning model's prediction accuracy.

[0094] Optionally, the relationship between the prediction accuracy of the meta-learning model and a preset accuracy threshold is determined. If the prediction accuracy of the meta-learning model is greater than the preset accuracy threshold, the trained stacked generalization model is determined as the stacked prediction model. If the prediction accuracy of the meta-learning model is less than the preset accuracy threshold, the above training process is repeated until the prediction accuracy of the meta-learning model is greater than the preset accuracy threshold.

[0095] S260: Use the processing server corresponding to the minimum predicted response time as the target server.

[0096] Specifically, after obtaining the predicted response time of each processing server, the processing server corresponding to the minimum predicted response time is used as the target server, the service request is forwarded to the target server, and the target server processes the service request.

[0097] Optionally, after forwarding the service request to the processing server and completing the target server's processing of the service request, the target server's processing time is recorded as the target server's actual processing time. The target server's server hardware configuration, available resource information, the service request type, and the actual processing time are also recorded. The recorded data is then added to a preset incremental dataset. If the incremental dataset meets preset incremental conditions, the stacking prediction model is incrementally fine-tuned using the data in the incremental dataset. The incremental dataset may be a dataset pre-set to record processing records for load distribution using the stacking prediction model.

[0098] Optionally, the stacking prediction model is incrementally trained based on the data in the incremental data set, and the model parameters of each base learning model and meta-learning model in the stacking prediction model are updated to update the stacking prediction model. The response time prediction data is processed based on the updated stacking prediction model to determine the predicted response time.

[0099] The technical solution of the embodiment of the present invention receives access service data to be processed by a server cluster, identifies the application characteristics, historical access volume characteristics, predicted date characteristics and single-day access volume ratio characteristics corresponding to the access service data, and pre-acquires the access service data to be processed, so as to make pre-adjustments based on the access volume, thereby improving the dynamic adjustment speed of the server cluster in high concurrency scenarios; scales the server cluster based on the application characteristics, historical access volume characteristics, predicted date characteristics and single-day access volume ratio characteristics, determines at least one processing server, and actively adapts to the access volume by pre-adjusting the processing servers of the server cluster, thereby improving the efficiency of scaling the server cluster; when receiving a service request corresponding to the access service data, obtains the service resource information corresponding to each of the processing servers, performs load balancing distribution for the service request based on the service resource information of the server, thereby improving the accuracy of load balancing distribution; and allocates a target server to the service request based on the request type corresponding to the service request and the hardware resource information of each of the processing servers. In high-concurrency scenarios, by pre-scaling the server cluster, dynamic load balancing is performed for high-concurrency service requests based on the scaled-up and scaled-down servers. This improves the accuracy of the load balancing strategy and the stability of the server cluster in handling high-concurrency service requests. This addresses the technical issues of low scaling efficiency of server clusters in high-concurrency scenarios and the inability of load balancing strategies to adapt to service requests in existing technologies. By accurately predicting the number of visits, the server cluster's response strategy to access can be adjusted in a timely manner, and service requests can be load-balanced based on server resources, improving the server cluster's load balancing capabilities in high-concurrency scenarios.

[0100] Figure 3 This is a flow chart of a load balancing method for a server cluster in a high-concurrency scenario provided by an embodiment of the present invention. The relationship between this embodiment and the above embodiments specifically introduces the specific process of predicting the number of visits based on the application characteristics and predicted date characteristics of the access service data. Figure 3 As shown, the method includes:

[0101] S310: Receive access service data to be processed by a server cluster, and identify application characteristics, historical visit volume characteristics, predicted date characteristics, and single-day visit volume ratio characteristics corresponding to the access service data.

[0102] S320: Input the application features, the date features, the page views of the previous day, and the multi-day average page views into a pre-trained page view prediction model to determine the predicted page views.

[0103] The visit volume prediction model can be a pre-trained time series model used to predict the daily visit volume of a server cluster. It should be noted that the visit volume prediction model is trained based on a first time series model, which can be a pre-built deep learning model. Exemplarily, the first time series model can be an LSTM model or a GRU model in a recurrent neural network.

[0104] Among them, the predicted visits can be the visits received by the server cluster by the service request on the date corresponding to the date feature predicted by the visit prediction model based on the application characteristics corresponding to the access service data, the date characteristics, the previous day's visits and the multi-day average visits.

[0105] Specifically, the application features, the date features, the previous day's visits, and the multi-day average visits are input into a pre-trained visit prediction model to determine the predicted visit volume.

[0106] S330: Input the date feature, the time segment feature, and the daily visit volume ratio feature into a pre-trained time-sharing ratio model to determine the visit volume time-sharing ratio.

[0107] The time-sharing proportion model can be a pre-trained time series model used to predict the distribution ratio of daily visits to a server cluster. It should be noted that the number of visits to a server cluster by service requests is distributed over time periods, and the time-sharing proportion model can be used to predict the distribution ratio of visits in different time periods.

[0108] Optionally, the time-sharing ratio model is trained based on the second time series model, which can be a pre-built deep learning model. Exemplarily, the second time series model can be an LSTM model or a GRU model in a recurrent neural network.

[0109] The time-sharing ratio of the visits may be a ratio of visits requesting the server cluster in different time periods predicted by a time-sharing ratio model based on the date feature, time segment feature and single-day visit ratio feature corresponding to the access service data.

[0110] Specifically, the date feature, the time segment feature and the single-day visit volume ratio feature are input into a pre-trained time-sharing ratio model to determine the visit volume time-sharing ratio.

[0111] Optionally, in another optional embodiment of the present invention, before inputting the application features into a pre-trained first time series model to determine the predicted visit volume, the method further includes:

[0112] Collecting application history information of the server cluster, and constructing first time series training data and second time series training data based on the application history information;

[0113] Training a pre-built first time series model based on the first time series training data to determine a visit volume prediction model;

[0114] A pre-built second time series model is trained based on the second time series training data to determine a time-sharing proportion model.

[0115] The historical application data may be log data recorded by the server cluster.

[0116] The first time series training data is training data for training a first time series model; and the second time series training data is training data for training a second time series model.

[0117] Optionally, after obtaining the historical application data, the historical application data is cleaned, missing values ​​and outliers are processed, and then the first time series training data is constructed based on the four feature dimensions of application characteristics, date characteristics, previous day visits and multi-day average visits, and the second time series training data is constructed based on the three feature dimensions of date characteristics, time segment characteristics and single-day visit ratio characteristics.

[0118] Optionally, the first time series training data is divided into a first training set and a first test set, the first training set is used to train the first time series model, the model parameters are iteratively updated, and the first test set is used to evaluate the model performance of the first time series model to obtain a visit volume prediction model.

[0119] Optionally, the second time series training data is divided into a second training set and a second test set, the second time series model is trained using the second training set, the model parameters are iteratively updated, and the model performance of the second time series model is evaluated using the second test set to obtain a time-sharing proportional model.

[0120] Specifically, application history information of the server cluster is collected, and first time series training data and second time series training data are constructed based on the application history information; a pre-constructed first time series model is trained based on the first time series training data to determine a visit volume prediction model; and a pre-constructed second time series model is trained based on the second time series training data to determine a time-sharing ratio model.

[0121] S340 , allocating servers in the server cluster based on the predicted page views and the page view time-sharing ratio, and determining at least one processing server.

[0122] Optionally, when allocating servers for a server cluster, identify whether the server cluster meets the reference predicted access volume. If it cannot meet the predicted access volume, the server cluster will automatically expand its capacity, increase the service computing nodes of the server cluster, and then allocate corresponding multiple processing servers for accessing the server data; if the existing number of servers in the server cluster can meet the predicted access volume, the server cluster will automatically reduce the service computing nodes for accessing the service data, and allocate one or more processing servers that meet the access volume to the access server data.

[0123] Optionally, when allocating processing servers to access server data, a scaling plan is set for the time-sharing ratio of access volume based on the scaling strategy, different scaling strategies are implemented in different time periods, a time-sharing execution time strategy is set based on the time period corresponding to the time-sharing ratio of access volume, and the scaling plan is automatically executed in different time periods based on the time-sharing execution time strategy, thereby allocating at least one different processing server in different time periods.

[0124] Specifically, based on the predicted access volume and the time-sharing ratio of the access volume, server allocation is performed in the server cluster to determine at least one processing server.

[0125] S350: Upon receiving a service request corresponding to the access service data, obtain service resource information corresponding to each of the processing servers.

[0126] S360: For each of the processing servers, use the hardware resource information and the request type as response time prediction data.

[0127] S370: Process the response time prediction data using a pre-trained stack prediction model to predict the processing time and determine the predicted response time.

[0128] S380: Use the processing server corresponding to the minimum predicted response time as the target server.

[0129] The technical solution of the embodiment of the present invention receives access service data to be processed by a server cluster, identifies the application characteristics, historical access volume characteristics, predicted date characteristics and single-day access volume ratio characteristics corresponding to the access service data, and pre-acquires the access service data to be processed, so as to make pre-adjustments based on the access volume, thereby improving the dynamic adjustment speed of the server cluster in high concurrency scenarios; scales the server cluster based on the application characteristics, historical access volume characteristics, predicted date characteristics and single-day access volume ratio characteristics, determines at least one processing server, and actively adapts to the access volume by pre-adjusting the processing servers of the server cluster, thereby improving the efficiency of scaling the server cluster; when receiving a service request corresponding to the access service data, obtains the service resource information corresponding to each of the processing servers, performs load balancing distribution for the service request based on the service resource information of the server, thereby improving the accuracy of load balancing distribution; and allocates a target server to the service request based on the request type corresponding to the service request and the hardware resource information of each of the processing servers. In high-concurrency scenarios, by pre-scaling the server cluster, dynamic load balancing is performed for high-concurrency service requests based on the scaled-up and scaled-down servers. This improves the accuracy of the load balancing strategy and the stability of the server cluster in handling high-concurrency service requests. This addresses the technical issues of low scaling efficiency of server clusters in high-concurrency scenarios and the inability of load balancing strategies to adapt to service requests in existing technologies. By accurately predicting the number of visits, the server cluster's response strategy to access can be adjusted in a timely manner, and service requests can be load-balanced based on server resources, improving the server cluster's load balancing capabilities in high-concurrency scenarios.

[0130] Figure 4 The present invention provides a schematic diagram of a load balancing device for a server cluster in a high-concurrency scenario. Figure 4 As shown, the device includes: a data processing module 410, a load prediction and distribution module 420, a load resource processing module 430 and a load distribution module 440; wherein,

[0131] The data processing module 410 is configured to receive access service data to be processed by the server cluster and identify application characteristics, historical visit volume characteristics, predicted date characteristics, and daily visit volume ratio characteristics corresponding to the access service data;

[0132] A load prediction and allocation module 420 is configured to scale the server cluster based on the application characteristics, the historical visit volume characteristics, the predicted date characteristics, and the daily visit volume ratio characteristics, and determine at least one processing server;

[0133] The load resource processing module 430 is configured to obtain service resource information corresponding to each of the processing servers upon receiving a service request corresponding to the access service data;

[0134] The load distribution module 440 is configured to allocate a target server to the service request based on the request type corresponding to the service request and the hardware resource information of each of the processing servers.

[0135] The technical solution of the embodiment of the present invention receives access service data to be processed by a server cluster, identifies the application characteristics, historical access volume characteristics, predicted date characteristics and single-day access volume ratio characteristics corresponding to the access service data, and pre-acquires the access service data to be processed, so as to make pre-adjustments based on the access volume, thereby improving the dynamic adjustment speed of the server cluster in high concurrency scenarios; scales the server cluster based on the application characteristics, historical access volume characteristics, predicted date characteristics and single-day access volume ratio characteristics, determines at least one processing server, and actively adapts to the access volume by pre-adjusting the processing servers of the server cluster, thereby improving the efficiency of scaling the server cluster; when receiving a service request corresponding to the access service data, obtains the service resource information corresponding to each of the processing servers, performs load balancing distribution for the service request based on the service resource information of the server, thereby improving the accuracy of load balancing distribution; and allocates a target server to the service request based on the request type corresponding to the service request and the hardware resource information of each of the processing servers. In high-concurrency scenarios, by pre-scaling the server cluster, dynamic load balancing is performed for high-concurrency service requests based on the scaled-up and scaled-down servers. This improves the accuracy of the load balancing strategy and the stability of the server cluster in handling high-concurrency service requests. This addresses the technical issues of low scaling efficiency of server clusters in high-concurrency scenarios and the inability of load balancing strategies to adapt to service requests in existing technologies. By accurately predicting the number of visits, the server cluster's response strategy to access can be adjusted in a timely manner, and service requests can be load-balanced based on server resources, improving the server cluster's load balancing capabilities in high-concurrency scenarios.

[0136] Optionally, the load distribution module 440 is specifically configured to:

[0137] For each of the processing servers, using the hardware resource information and the request type as response time prediction data;

[0138] The response time prediction data is processed by a pre-trained stack prediction model to predict the processing time and determine the predicted response time;

[0139] The processing server corresponding to the minimum predicted response time is used as the target server.

[0140] Optionally, the device further includes a training data collection module, a training set module and a model training module; wherein,

[0141] The training data collection module is used to record the processing record of each service request by the server cluster; wherein the processing record includes the server hardware configuration, available resource information, request type of the service request and server processing time for processing the service request;

[0142] The training set module is used to use each processing record as model training data to construct a model training data set;

[0143] The model training module is used to perform model training on the pre-built stacking generalization model based on the model training data set to obtain a stacking prediction model.

[0144] Optionally, the model training module is specifically used to:

[0145] The stacked generalization model includes at least one type of base learner and meta learner;

[0146] The method of performing model training on a pre-built stacking generalization model based on the model training data set to obtain a stacking prediction model includes:

[0147] Divide the model training data set into multiple training data subsets by random non-repeated sampling method;

[0148] For each type of the base learner, performing model training on the base learner based on the plurality of training data subsets, and determining at least one base learning model and a prediction verification result corresponding to each base learning model;

[0149] For each type of the base learner, merging the prediction verification results corresponding to each base learning model to determine the prediction result of the base learner;

[0150] The prediction results corresponding to all types of base learners are used as combined training data;

[0151] Performing model training on the meta-learner based on the combined training data to determine a meta-learning model;

[0152] When the prediction accuracy of the meta-learning model is greater than a preset accuracy threshold, the stacked generalization model is determined as the stacked prediction model.

[0153] Optionally, the model training module is further configured to:

[0154] For each model training, a plurality of model training sets and a model validation set are randomly determined based on a plurality of the training data subsets;

[0155] The base learner is subjected to model training based on the multiple model training sets to determine at least one base learning model, and the base learning model is subjected to model verification through a model verification set to determine the prediction verification result.

[0156] Optionally, the load prediction and distribution module 420 is specifically configured to:

[0157] The historical visit volume features include the previous day's visit volume and the average visit volume over multiple days; the predicted date features include date features and time segment features;

[0158] Inputting the application features, the date features, the previous day's visits, and the multi-day average visits into a pre-trained visit volume prediction model to determine the predicted visit volume;

[0159] Input the date feature, time segment feature and single-day visit volume ratio feature into a pre-trained time-sharing ratio model to determine the visit volume time-sharing ratio;

[0160] Based on the predicted number of visits and the time-sharing ratio of the number of visits, servers are allocated in the server cluster to determine at least one processing server.

[0161] Optionally, the device further includes a time series data construction module, a first time series model training module and a second time series model training module; wherein,

[0162] The time series data construction module is used to collect application history information of the server cluster and construct first time series training data and second time series training data based on the application history information;

[0163] The first time series model training module is used to train a pre-built first time series model based on the first time series training data to determine a visit volume prediction model;

[0164] The second time series model training module is used to train a pre-built second time series model based on the second time series training data to determine a time-sharing proportion model.

[0165] The load balancing device for a server cluster in a high-concurrency scenario provided by an embodiment of the present invention can execute the load balancing method for a server cluster in a high-concurrency scenario provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0166] Figure 5A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their modes are only examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0167] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0168] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0169] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the load balancing method for a server cluster in a high-concurrency scenario.

[0170] In some embodiments, the load balancing method for a server cluster in a high-concurrency scenario can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the load balancing method for a server cluster in a high-concurrency scenario described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the load balancing method for a server cluster in a high-concurrency scenario in any other appropriate manner (for example, by means of firmware).

[0171] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0172] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the modes / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0173] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0174] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0175] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or grid browser through which a user can interact with embodiments of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by digital data communication (e.g., a communication grid) in any form or medium. Examples of communication grids include: a local area network (LAN), a wide area network (WAN), a blockchain grid, and the Internet.

[0176] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication grid. This client-server relationship arises through computer programs running on the respective computers, establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within a cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0177] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0178] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program implements the steps of a method for load balancing a server cluster in a high-concurrency scenario as provided in any embodiment of the present invention. The method includes:

[0179] Receive access service data to be processed by the server cluster, and identify application characteristics, historical visit volume characteristics, predicted date characteristics, and single-day visit volume ratio characteristics corresponding to the access service data;

[0180] Scaling the server cluster based on the application characteristics, the historical visit volume characteristics, the predicted date characteristics, and the single-day visit volume ratio characteristics, and determining at least one processing server;

[0181] Upon receiving a service request corresponding to the access service data, obtaining service resource information corresponding to each of the processing servers;

[0182] A target server is allocated to the service request based on the request type corresponding to the service request and the hardware resource information of each of the processing servers.

[0183] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.

[0184] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0185] Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0186] The computer program code for performing the operations of the present invention can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of grid, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0187] Those skilled in the art will appreciate that the modules or steps of the present invention described above can be implemented using a general-purpose computing device. They can be centralized on a single computing device or distributed across a grid of multiple computing devices. Alternatively, they can be implemented using program code executable by a computer device, which can then be stored in a storage device and executed by the computing device. Alternatively, they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0188] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0189] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A load balancing method for a server cluster in a high-concurrency scenario, characterized in that: include: Receive access service data to be processed by the server cluster, and identify application characteristics, historical visit volume characteristics, predicted date characteristics, and single-day visit volume ratio characteristics corresponding to the access service data; Scaling the server cluster based on the application characteristics, the historical visit volume characteristics, the predicted date characteristics, and the daily visit volume ratio characteristics, and determining at least one processing server; Upon receiving a service request corresponding to the access service data, obtaining service resource information corresponding to each of the processing servers; A target server is allocated to the service request based on the request type corresponding to the service request and the hardware resource information of each of the processing servers.

2. The method according to claim 1, characterized in that The allocating a target server to the service request based on the service type corresponding to the service request and the hardware resource information of each processing server includes: For each of the processing servers, using the hardware resource information and the request type as response time prediction data; The response time prediction data is processed by a pre-trained stack prediction model to predict the processing time and determine the predicted response time; The processing server corresponding to the minimum predicted response time is used as the target server.

3. The method according to claim 2, characterized in that Before performing processing time prediction on the response time prediction data through a pre-trained stack prediction model to determine the predicted response time, the method further includes: Record the processing record of each service request by the server cluster; wherein the processing record includes the server hardware configuration, available resource information, request type of the service request and server processing time for processing the service request; Use each processed record as model training data to construct a model training dataset; Model training is performed on a pre-built stacking generalization model based on the model training data set to obtain a stacking prediction model.

4. The method according to claim 3, characterized in that The stacked generalization model includes at least one type of base learner and meta learner; The method of performing model training on a pre-built stacking generalization model based on the model training data set to obtain a stacking prediction model includes: Divide the model training data set into multiple training data subsets by random non-repeated sampling method; For each type of the base learner, performing model training on the base learner based on the plurality of training data subsets, and determining at least one base learning model and a prediction verification result corresponding to each base learning model; For each type of the base learner, merging the prediction verification results corresponding to each base learning model to determine the prediction result of the base learner; The prediction results corresponding to all types of base learners are used as combined training data; Performing model training on the meta-learner based on the combined training data to determine a meta-learning model; When the prediction accuracy of the meta-learning model is greater than a preset accuracy threshold, the stacked generalization model is determined as the stacked prediction model.

5. The method according to claim 4, characterized in that include: For each model training, a plurality of model training sets and a model validation set are randomly determined based on a plurality of the training data subsets; The base learner is subjected to model training based on the multiple model training sets to determine at least one base learning model, and the base learning model is model verified through the model verification set to determine the prediction verification result.

6. The method according to claim 1, characterized in that The historical visit volume features include the previous day's visit volume and the average visit volume over multiple days; the predicted date features include date features and time segment features; The scaling of the server cluster based on the application characteristics, the historical visit volume characteristics, the predicted date characteristics, and the daily visit volume ratio characteristics to determine at least one processing server includes: Inputting the application features, the date features, the previous day's visits, and the multi-day average visits into a pre-trained visit volume prediction model to determine the predicted visit volume; Input the date feature, time segment feature and single-day visit volume ratio feature into a pre-trained time-sharing ratio model to determine the visit volume time-sharing ratio; Based on the predicted number of visits and the time-sharing ratio of the number of visits, servers are allocated in the server cluster to determine at least one processing server.

7. The method according to claim 6, characterized in that Before inputting the application features into a pre-trained first time series model to determine the predicted visit volume, the method further includes: Collecting application history information of the server cluster, and constructing first time series training data and second time series training data based on the application history information; Training a pre-built first time series model based on the first time series training data to determine a visit volume prediction model; A pre-built second time series model is trained based on the second time series training data to determine a time-sharing proportion model.

8. A load balancing device for a server cluster in a high-concurrency scenario, characterized in that: include: A data processing module is used to receive access service data to be processed by the server cluster, and identify application characteristics, historical visit volume characteristics, predicted date characteristics, and single-day visit volume ratio characteristics corresponding to the access service data; A load prediction and allocation module, configured to scale the server cluster based on the application characteristics, the historical visit volume characteristics, the predicted date characteristics, and the daily visit volume ratio characteristics, and determine at least one processing server; A load resource processing module, configured to obtain service resource information corresponding to each of the processing servers upon receiving a service request corresponding to the access service data; The load distribution module is used to allocate a target server to the service request based on the request type corresponding to the service request and the hardware resource information of each processing server.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the load balancing method of the server cluster in the high concurrency scenario described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the load balancing method for a server cluster in a high-concurrency scenario according to any one of claims 1 to 7 when executed.