A distributed system service scheduling optimization method, device, equipment and medium
By using the service load prediction model in a distributed system, combined with basic performance indicators and anomaly detection signals, it predicts future server load and adjusts the number of service instances, solving the load balancing problem and improving resource utilization and system stability.
Patent Information
- Application Number
- CN202411053487.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-08-02
AI Technical Summary
In a cloud computing environment, it is difficult for distributed systems to achieve accurate server load balancing, leading to problems of overload or underload. In addition, network delays and scheduling granularity are difficult to grasp, resulting in insufficient resource utilization and excessive scheduling overhead, which increases System instability and communication costs.
By obtaining the basic performance indicators, extended performance indicators and anomaly detection signals in the HTTP requests sent by the client, the service load prediction model is used to predict the server load in the future time period, and schedule the number of service instances based on the preset load threshold. Strategies to optimize service scheduling.
It achieves accurate prediction of server load in the future time period, dynamically adjusts the number of service instances, improves the reasonable allocation and utilization of resources, reduces system instability, and improves service responsiveness and customer satisfaction.
Smart Images

Figure CN118590549B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of service scheduling, and in particular to a distributed system service scheduling optimization method, device, equipment and medium. Background Art
[0002] At present, in the cloud computing environment, when a new computing task comes in, the distributed system will first check the current load of each server node, and then decide to assign it to a lightly loaded and suitable server for execution based on factors such as the computing amount and priority of the task. During the execution process, if a server fails or the load is too high, the system will promptly migrate the relevant tasks to other suitable servers for continued execution to ensure the stability and efficiency of the entire service. However, the distributed system often performs real-time task allocation based on the current new computing tasks, that is, the distributed system needs to calculate the current load of each server node in a short time and assign computing tasks. In this way, it is not easy to achieve accurate load balancing of each server node. Some nodes may be overloaded while other nodes are lightly loaded, affecting the overall performance and stability. In addition, it is difficult to determine the appropriate scheduling granularity. Too coarse may lead to insufficient resource utilization, and too fine may bring too much scheduling overhead. Moreover, when the system is distributed in different geographical areas, there may be large differences in network delays and high delays in communication between nodes, resulting in untimely transmission of scheduling information, affecting scheduling efficiency, increasing communication costs, and increasing scheduling difficulty.
[0003] In summary, how to predict the system load in the future time period so as to dynamically schedule services according to business needs is a technical problem to be solved in this field. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a distributed system service scheduling optimization method, device, equipment and medium, which can predict the system load in the future time period so as to dynamically schedule services according to business needs. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a distributed system service scheduling optimization method, which is applied to a service management center, comprising:
[0006] Obtaining an HTTP request sent by a client to parse and obtain monitoring data including basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals of a target server; wherein the HTTP request is request data after the client monitors various performance data generated by the target server and encapsulates the various performance data;
[0007] Input the monitoring data into the target service load prediction model, so as to predict the load of the target server in the future time period according to the basic performance index, the extended performance index, the time-related influencing factors, and the abnormal detection signal through the target service load prediction model, so as to obtain the corresponding target load prediction value;
[0008] According to the relationship between the target load prediction value and the preset load threshold, a scheduling strategy for increasing or decreasing the number of corresponding service instances is formulated and executed to optimize service scheduling.
[0009] Optionally, obtaining the HTTP request sent by the client includes:
[0010] The HTTP request client encapsulates the uploaded request based on the basic performance indicators that characterize the health status of the target server, the extended performance indicators of the cache hit rate, the time-related influencing factors during the access peak period, and the abnormal detection signals as monitoring data; wherein the extended performance indicators include the disk read-write ratio, the number of active connections, and the number of threads; the time-related influencing factors include working days, non-working days, and holidays; the abnormal detection signals include the fault marks and abnormal access patterns of the target server.
[0011] Optionally, before inputting the monitoring data into the target service load prediction model, the method further includes:
[0012] The initial service load prediction model is trained using the collected historical monitoring data including the historical basic performance indicators, historical extended performance indicators, historical time-related influencing factors, and historical anomaly detection signals of each server to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in future time periods.
[0013] Optionally, the use of the collected historical monitoring data including historical basic performance indicators, historical extended performance indicators, historical time-related influencing factors, and historical abnormal detection signals of each server to train the initial service load prediction model to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period includes:
[0014] The historical monitoring data is sequentially subjected to data cleaning processing, missing value processing, feature conversion processing, and feature dimension reduction processing to obtain training data; wherein the training data includes a load label corresponding to the historical monitoring data;
[0015] Inputting the training data into the initial service load prediction model, so that the initial service load prediction model performs moving average calculation and exponential smoothing calculation on the training data according to the timestamp information of the historical monitoring data, so as to obtain the average utilization rate characteristics of the server resources at each time point and the exponential smoothing characteristics;
[0016] The average utilization rate characteristics of server resources, exponential smoothing characteristics, historical basic performance characteristics, historical time-related influencing factor characteristics and historical anomaly detection signal characteristics are used as input features to train the initial service load prediction model to learn the association between features and the correspondence between features and load labels, so as to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period.
[0017] Optionally, the initial service load prediction model is a stacked long short-term memory network model for capturing feature dependencies in time series.
[0018] Optionally, the inputting the training data into the initial service load prediction model so that the initial service load prediction model performs moving average calculation and exponential smoothing calculation on the training data according to the timestamp information of the historical monitoring data to obtain characteristics of the average usage rate of server resources at each time point and exponential smoothing characteristics, including:
[0019] The training data is input into the stacked long short-term memory network model, so as to determine whether the historical access peak time period characteristics and the historical abnormal access pattern characteristics in the training data are category characteristics through the embedding layer of the stacked long short-term memory network model. If so, the historical access peak time period characteristics and the historical abnormal access pattern characteristics are converted into continuous vectors through the embedding layer to obtain corresponding target training data containing target historical access peak time period characteristics and target historical abnormal access pattern characteristics, and moving average calculation and exponential smoothing calculation are performed on the target training data to obtain characteristics representing the average utilization rate of server resources at each time point and exponential smoothing characteristics;
[0020] Accordingly, the server resource average utilization rate feature, exponential smoothing feature, historical basic performance feature, historical time-related influencing factor feature and historical abnormal detection signal feature are used as input features to train the initial service load prediction model to learn the association between features and the correspondence between features and load labels, so as to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period, including:
[0021] The average utilization rate characteristics of server resources, exponential smoothing characteristics, historical basic performance characteristics, the target historical access peak period characteristics and the target historical abnormal access pattern characteristics are used as input features to train the long short-term memory network layer of the stacked long short-term memory network model to learn the time dependency between the average utilization rate characteristics of server resources and the exponential smoothing characteristics, and to train the target stacked long short-term memory network layer to learn the correspondence between each feature and the load label, so as to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period.
[0022] Optionally, formulating and executing a scheduling strategy for increasing or decreasing the number of corresponding service instances according to the size relationship between the target load prediction value and a preset load threshold to optimize service scheduling includes:
[0023] Setting a load upper limit threshold and a load lower limit threshold as preset load thresholds, and comparing the magnitude relationship between the target load prediction value and the preset load thresholds to obtain a corresponding comparison result;
[0024] If the comparison result is that the target load prediction value is greater than the load upper limit threshold, triggering sending an instruction to increase the number of service instances to the distributed service node, so as to formulate a corresponding scheduling strategy and optimize service scheduling;
[0025] If the comparison result is that the target load prediction value is less than the load lower limit threshold, an instruction to reduce the number of service instances is triggered to be sent to the target server, so as to formulate a corresponding scheduling strategy and optimize service scheduling.
[0026] In a second aspect, the present application discloses a distributed system service scheduling optimization device, which is applied to a service management center, including:
[0027] A data acquisition module is used to acquire the HTTP request sent by the client to parse and obtain monitoring data including basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals of the target server; wherein the HTTP request is request data after the client monitors the various performance data generated by the target server and encapsulates the various performance data;
[0028] A load prediction module, used to input the monitoring data into a target service load prediction model, so as to predict the load of the target server in a future time period according to basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals through the target service load prediction model, so as to obtain a corresponding target load prediction value;
[0029] The scheduling optimization module is used to formulate and execute a scheduling strategy for increasing or decreasing the number of corresponding service instances according to the size relationship between the target load prediction value and the preset load threshold, so as to optimize service scheduling.
[0030] In a third aspect, the present application discloses an electronic device, comprising:
[0031] Memory, used to store computer programs;
[0032] The processor is used to execute the computer program to implement the steps of the above-disclosed distributed system service scheduling optimization method.
[0033] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned distributed system service scheduling optimization method are implemented.
[0034] It can be seen that the present application discloses obtaining the HTTP request sent by the client to parse and obtain monitoring data containing the basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals of the target server; wherein the HTTP request is the request data after the client monitors the various performance data generated by the target server and encapsulates the various performance data; the monitoring data is input into the target service load prediction model, so that the target service load prediction model can predict the load of the target server in the future time period according to the basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals, respectively, to obtain the corresponding target load prediction value; according to the size relationship between the target load prediction value and the preset load threshold, formulate and execute the corresponding scheduling strategy of increasing or decreasing the number of service instances to optimize service scheduling. It can be seen that by comprehensively considering the basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals, the load of the target server in the future time period can be more accurately predicted, providing a reliable basis for scheduling decisions. Dynamically adjusting the number of service instances based on the comparison of accurate load prediction values and preset load thresholds helps to achieve reasonable allocation and efficient utilization of resources and avoid waste or insufficient resources. Timely adjustment of scheduling strategies according to load conditions can reduce system instability factors caused by excessive or low loads, and improve the overall stability and reliability of the system. By optimizing service scheduling, we can ensure that services can respond to and process requests in a timely manner, thereby improving client satisfaction and service quality. We can quickly respond to changes in server performance, the influence of time factors, and abnormal situations, making the system more adaptable and flexible. By using information such as abnormal detection signals, we can detect potential problems in advance and take corresponding scheduling strategies to prevent them, thereby reducing the risk of failures. Based on model prediction and analysis, we can predict server loads for a period of time in the future, arrange service scheduling for each server node in advance, dynamically adjust the number of service instances, realize resource automation, and realize intelligent service scheduling decision-making process, reducing the uncertainty of human intervention. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention 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 embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0036] Figure 1 A flow chart of a distributed system service scheduling optimization method disclosed in this application;
[0037] Figure 2A flow chart of a data monitoring and collection method disclosed in this application;
[0038] Figure 3 The components and communication flow chart of a service management center disclosed in this application;
[0039] Figure 4 A flow chart of a target service load prediction model training method disclosed in this application;
[0040] Figure 5 A schematic diagram of the structure of a distributed system service scheduling optimization device disclosed in this application;
[0041] Figure 6 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0043] At present, in the cloud computing environment, when a new computing task comes in, the distributed system will first check the current load of each server node, and then decide to assign it to a lightly loaded and suitable server for execution based on factors such as the computing amount and priority of the task. During the execution process, if a server fails or the load is too high, the system will promptly migrate the relevant tasks to other suitable servers for continued execution to ensure the stability and efficiency of the entire service. However, the distributed system often performs real-time task allocation based on the current new computing tasks, that is, the distributed system needs to calculate the current load of each server node in a short time and assign computing tasks. In this way, it is not easy to achieve accurate load balancing of each server node. Some nodes may be overloaded while other nodes are lightly loaded, affecting the overall performance and stability. In addition, it is difficult to determine the appropriate scheduling granularity. Too coarse may lead to insufficient resource utilization, and too fine may bring too much scheduling overhead. Moreover, when the system is distributed in different geographical areas, there may be large differences in network delays and high delays in communication between nodes, resulting in untimely transmission of scheduling information, affecting scheduling efficiency, increasing communication costs, and increasing scheduling difficulty.
[0044] To this end, the present invention provides a distributed system service scheduling optimization solution, which can predict the system load in the future time period so as to dynamically schedule services according to business needs.
[0045] Reference Figure 1 As shown, the embodiment of the present invention discloses a distributed system service scheduling optimization method, which is applied to a service management center, including:
[0046] Step S11: Obtain the HTTP request sent by the client to parse and obtain monitoring data including basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals of the target server; wherein the HTTP request is request data after the client monitors the various performance data generated by the target server and encapsulates the various performance data.
[0047] In this embodiment, the service management center first obtains an HTTP (HyperText Transfer Protocol Request) request sent by the client through a preset data upload method, wherein the HTTP request includes the following contents:
[0048] The HTTP request client encapsulates the uploaded request based on the basic performance indicators that characterize the health status of the target server, the extended performance indicators of the cache hit rate, the time-related influencing factors during the access peak period, and the abnormal detection signal as the monitoring data; wherein the extended performance indicators include the disk read-write ratio, the number of active connections, and the number of threads; the time-related influencing factors include working days, non-working days, and holidays; the abnormal detection signal includes the fault mark of the target server and the abnormal access pattern. It can be understood that the HTTP request is a request encapsulated by the corresponding monitoring data generated by the target server of the monitoring client, specifically, Figure 2The figure shows the implementation details of the client monitoring module, including the collection, processing and upload process of monitoring data. The monitoring data collection program is responsible for collecting various performance data, the data processing and aggregation program aggregates the collected data, and the data upload program packages the processed HTTP request and uploads it to the service management center. Such an implementation can ensure the accuracy and timeliness of monitoring data and provide reliable data support for service scheduling optimization. Among them, the client monitoring module collects various performance data of the server through system performance monitoring tools or custom monitoring programs. The client monitoring module encapsulates the collected monitoring data into HTTP requests and uploads them to the service management center through POST or other methods. Basic performance indicators: ensure that core indicators are included, such as CPU usage, memory occupancy, disk input and output rate, network throughput, etc., which are key indicators that directly reflect the health of the system. Extended performance indicators: consider adding more dimensions, such as disk read and write ratio, number of active connections, number of threads, cache hit rate, etc., to enrich the model's ability to identify system load. External influencing factors: Incorporating external factors such as user request volume, time-related influencing factors (such as weekdays / weekends, peak hours, and holiday effects) helps the model understand seasonal and cyclical changes in load. Anomaly detection signals: Adding anomaly detection results as features, such as fault marking and abnormal access pattern recognition, enables the model to respond quickly to potential problems. It can be seen that through system performance monitoring tools or custom programs, server performance data is collected in an all-round manner, including core indicators and extended indicators, as well as external influencing factors and anomaly detection, to ensure the comprehensiveness and accuracy of monitoring data.
[0049] Step S12: Input the monitoring data into the target service load prediction model so that the target service load prediction model can predict the load of the target server in the future time period according to basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals to obtain the corresponding target load prediction value.
[0050] In this embodiment, the monitoring data obtained after parsing the HTTP request is input into the target service load prediction model obtained after training the initial service load prediction model, so that the target service load prediction model can directly predict the load prediction of the target server in the future period based on the monitoring data to obtain the corresponding target load prediction value.
[0051] In this embodiment, before inputting the monitoring data into the target service load prediction model, it also includes: using the collected historical monitoring data containing historical basic performance indicators, historical extended performance indicators, historical time-related influencing factors, and historical abnormal detection signals of each server to train the initial service load prediction model, so as to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period. Specifically, the historical monitoring data is sequentially subjected to data cleaning processing, missing value processing, feature conversion processing and feature dimension reduction processing to obtain training data; wherein the training data contains load labels corresponding to the historical monitoring data; the training data is input into the initial service load prediction model so that the initial service load prediction model performs moving average calculation and exponential smoothing calculation on the training data according to the timestamp information of the historical monitoring data to obtain characteristics of average server resource utilization and exponential smoothing characteristics that characterize each time point; the average server resource utilization characteristics, exponential smoothing characteristics, historical basic performance characteristics, historical time-related influencing factor characteristics and historical anomaly detection signal characteristics are used as input features to train the initial service load prediction model to learn the correlation between features and the correspondence between features and load labels, so as to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in future time periods. It is understandable that the basic performance indicators of each server in the distributed system are first obtained: make sure to include core indicators, such as CPU (Central Processing Unit) utilization, memory occupancy, disk I / O (Input / Output) rate, network throughput, etc., which are key indicators that directly reflect the health of the system. At the same time, further obtain the extended performance indicators of each server: consider adding more dimensions, such as disk read-write ratio, number of active connections, number of threads, cache hit rate, etc., to enrich the model's ability to identify system load. Then, consider external influencing factors at the same time: include external factors such as user request volume, specific time periods (such as weekdays / weekends, peak hours, holiday effects), etc., to help the model understand the seasonal and cyclical changes in the load. Finally, anomaly detection signals: add anomaly detection results as features, such as fault marking and abnormal access pattern recognition, so that the model can respond quickly to potential problems. All of the above indicator information is packaged into historical monitoring data, and through Figure 2 The data processing, uploading and storage methods in the data are stored in the database, so that when the model is trained, the service management center can directly call the corresponding historical monitoring data for further data processing and special engineering processing. 1. Basic processing: clean the data and handle missing values, such as filling with the value of the previous time point or the average value.
[0052] 2. Feature conversion processing: For example, binary coding, converting "whether it is a working day", "peak time", "fault mark" and "abnormal access mode" into binary features. The conversion results are shown in Table 1 below:
[0053] Table 1
[0054]
[0055] 3. Feature dimensionality reduction processing: Since there are too many indicators in the above-mentioned historical monitoring data, the following problems are caused: Increased computational complexity: More historical features after feature conversion of historical monitoring data means that the model needs to learn more weights and biases, which will increase the amount of calculation; Memory consumption: Especially in deep learning models, as the number of features increases, the number of model parameters increases, and the required memory will also increase; Overfitting risk: More features may cause the model to learn the noise in the data, increasing the risk of overfitting, which may require more regularization processing and parameter adjustment time; Optimization difficulty: It becomes more difficult to find the optimal solution in high-dimensional space, which may lead to longer training time, especially in non-convex optimization problems. Reduce the dimensionality of all features after the feature conversion of all historical monitoring data, that is, reduce the number of indicators to obtain training data. Specifically, the feature dimensionality reduction process is as follows:
[0056] 1. First, reduce the dimension of historical basic performance indicators (historical CPU usage, historical memory usage, and historical network throughput);
[0057] First, these historical basic performance indicators are normalized to make them comparable on the same scale. Then, weights W1, W2, W3 are assigned to each indicator based on business understanding, ensuring that the sum of all weights is 1. Finally, the weighted geometric mean method is applied to combine these indicators.
[0058] For example: the historical CPU usage is x1, the historical memory usage is x2, and the historical network throughput is x3.
[0059] Normalization: Convert each indicator into a value between 0 and 1.
[0060] x 1n = (x1 - min(x1)) / (max(x1) - min(x1));
[0061] x 2n = (x2 - min(x2)) / (max(x2) - min(x2));
[0062] x 3n = (x3 - min(x3)) / (max(x3) - min(x3));
[0063] Among them, x 1n represents the normalized CPU usage, min(x1) represents the minimum historical CPU usage, max(x1) represents the maximum historical CPU usage, x 2n represents the normalized memory usage, min(x2) represents the minimum historical memory usage, max(x2) represents the maximum historical memory usage, x 3n represents the normalized network throughput, min(x3) represents the minimum historical network throughput, and max(x3) represents the maximum historical network throughput;
[0064] Since the weighted geometric mean ensures that when the value of any one indicator decreases, even if the values of other indicators increase, the gain of the comprehensive indicator will not be too large, which reflects the balance of system performance. It is suitable for measuring factors that are interdependent and have an important impact on the overall performance. Therefore, after the normalization process is completed, the weighted geometric mean is performed:
[0065] Specifically, the comprehensive index S can be defined as: ;in, .
[0066] To simplify the explanation, it is assumed that there is no specific data range, the original data can be processed directly, and the calculation is performed assuming that all indicators are equally important (that is, the weights are equal, W1 = W2 = W3 = 1 / 3).
[0067] The following is a demonstration using a set of hypothetical data:
[0068] x1=75% (historical CPU usage);
[0069] x2=60% (historical memory usage);
[0070] x3=200Mbps (historical network throughput);
[0071] The historical data indicators and their respective maximum and minimum values have been given, as shown in Table 2 below. Correspondingly, according to the provided historical data indicators and their respective maximum and minimum values and normalization calculation formula, the normalized results after normalization calculation are obtained as shown in Table 2 below:
[0072] Table 2
[0073]
[0074] According to the above normalized calculation results and the corresponding weight coefficients, the comprehensive index S is calculated. The comprehensive index results are shown in Table 3 below:
[0075] Table 3
[0076]
[0077] The weighted normalized value of each indicator is multiplied to obtain: 0.25 × 0.20 × 0.222 = 0.0111, 0.25 × 0.20 × 0.222 = 0.0111. Apply the formula of weighted geometric mean. Since the weights are equal and the sum is 1, directly take the cube root of the result of the above product (because there are three indicators, if there are n indicators, the nth root should be taken): 0.0111...1 / 30.0111... 1 / 3 , the calculated comprehensive index S is about 0.011. The calculated comprehensive index S is used as the combined index after combining the historical basic performance indicators, that is, the resource utilization rate.
[0078] Now the updated results of indicator table 1 are shown in table 4 below:
[0079] Table 4
[0080]
[0081] According to the dimensionality reduction method of historical CPU usage, historical memory occupancy, and historical network throughput, the external factors: holidays, promotions, and peak hours are reduced to peak hours. Accordingly, the indicator results in Table 4 are updated as shown in Table 5:
[0082] Table 5
[0083]
[0084] In this way, through the above feature dimensionality reduction process, the training data finally obtained includes: resource usage rate, peak hours, and abnormal access with timestamps. It should be noted that the training data also includes the load labels corresponding to the above training data scenarios.
[0085] Once the moving average utilization feature and exponential smoothing feature are calculated, they can be used as input features together with the original "resource utilization", "peak hours", and "abnormal access" to train machine learning models (such as linear regression, random forest, neural network, etc.) to predict future resource utilization. The data quality is improved by careful preprocessing of the collected data, such as data cleaning, missing value filling, binary encoding, etc. The weighted geometric mean method is used for feature dimensionality reduction, which not only reduces the computational complexity, but also ensures that the model has a balanced understanding of the system status.
[0086] Step S13: According to the size relationship between the target load prediction value and the preset load threshold, formulate and execute a corresponding scheduling strategy for increasing or decreasing the number of service instances to optimize service scheduling.
[0087] In this embodiment, the load upper limit threshold and the load lower limit threshold are set as preset load thresholds, and the size relationship between the target load prediction value and the preset load threshold is compared to obtain a corresponding comparison result; if the comparison result is that the target load prediction value is greater than the load upper limit threshold, then trigger the distributed service node to send an instruction to increase the number of service instances to formulate a corresponding scheduling strategy to optimize service scheduling; if the comparison result is that the target load prediction value is less than the load lower limit threshold, then trigger the target server to send an instruction to reduce the number of service instances to formulate a corresponding scheduling strategy to optimize service scheduling. It can be understood that load prediction: according to the trained model, predict the target load prediction value of the system in the future period of time, including service request volume, resource demand, etc. The service management center formulates a suitable scheduling strategy based on the target load prediction value and the resource situation of the distributed system. For example, when it is predicted that the target load prediction value is greater than the preset upper limit threshold, a scheduling strategy to increase the number of service instances is formulated; when the target load prediction value is less than the preset lower limit threshold, a scheduling strategy to reduce the number of service instances is formulated. The formulated scheduling strategy is sent to the distributed service node to trigger the dynamic adjustment of the service instance and the gateway traffic load balancing. Based on the derived machine load in each time period, a dynamic scheduling strategy can be defined to adjust the number of service instances according to the changes in system load, thereby achieving reasonable utilization of resources and optimization of system performance. The following is the scheduling strategy:
[0088] 1. Set thresholds: First, you need to set the thresholds for machine loads so that scheduling operations can be triggered based on changes in machine loads. You can set two thresholds: the upper load threshold Lmax and the lower load threshold Lmin.
[0089] 2. Trigger condition: When the machine load exceeds the upper load threshold Lmax, it means that the system load is too high and the number of service instances needs to be increased to share the load. When the machine load is lower than the lower load threshold Lmin, it means that the system load is too low and the number of service instances can be reduced to save resources.
[0090] 3. Scheduling operation: Operation when the load is too high: When the machine load exceeds the upper load threshold Lmax, the operation of adding service instances is triggered to meet the increased load demand. The scheduling system sends instructions to the distributed service nodes to add new service instances. Operation when the load is too low: When the machine load is lower than the lower load threshold Lmin, the operation of reducing service instances is triggered to release resources. The scheduling system sends instructions to the distributed service nodes to stop some service instances. It can be seen that based on the prediction results, the number of service instances is dynamically adjusted to realize the automated and intelligent management of resources. By setting the load threshold to automatically trigger the scheduling operation, the system load is balanced, resource utilization is improved, and system performance is kept stable.
[0091] The service instance management module is responsible for starting and stopping service instances. It dynamically starts or stops service instances according to the instructions of the service management center. When the service management center predicts that the service load will increase, it starts a new service instance to meet the demand; when the service load decreases, it stops unnecessary service instances to release resources. Containerization technology support: Use containerization technology (such as Docker Engine) to manage service instances to achieve rapid deployment and startup. Encapsulate service instances into images to facilitate deployment and management on different nodes. Automatic expansion and contraction strategy: Automatically adjust the number of service instances according to real-time monitoring data and the instructions of the service management center. Dynamic routing: According to the instructions of the service management center, add the address of the service node so that the stopped service no longer receives requests, and the newly started service can continue to receive services. It can be seen that the use of containerization technologies such as Docker can realize the rapid deployment and management of service instances, and the number of instances can be automatically adjusted in combination with real-time monitoring data, with rapid response and high flexibility. The address of the service node can be dynamically adjusted according to the instructions of the service management center to ensure that the newly started service instance can immediately replace the stopped service instance, seamlessly handle service requests, and ensure user experience.
[0092] Reference Figure 3 As shown in the figure, the service management center and the components of the distributed system and their communication process are disclosed. First of all, the service management center is one of the core components in this solution. It is responsible for monitoring the system status, training the automatic learning model, formulating the scheduling strategy, and communicating with the distributed service nodes and gateways to achieve dynamic scheduling and traffic load balancing. The following are the detailed implementation details of the service management center:
[0093] First, the monitoring system status component of the service management center monitors and collects the resource information of client 1, client 2, and client 3 in real time as monitoring information, and then processes and stores the monitoring information in the preset database so that the service management center can call the relevant information from the database at any time to train the relevant linear regression model, so that the trained model can predict the load value of the server in the future. Then the service management center immediately determines the scheduling strategy suitable for the current distributed system based on the load prediction value and the scheduling strategy pre-formulated in the scheduling strategy formulation module, and sends the scheduling strategy to the Nginx (Nginx Gateway) gateway so that through the powerful load balancing capability of the Nginx gateway, the incoming requests are evenly distributed to multiple servers in the back-end strategy according to the scheduling strategy, thereby improving the processing capacity and resource utilization of the entire system. Taking the online video streaming platform as an example, Nginx can intelligently distribute the user's video playback request to different servers according to the load of the server to avoid overloading a server.
[0094] It can be seen that the present application discloses obtaining the HTTP request sent by the client to parse and obtain monitoring data containing the basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals of the target server; wherein the HTTP request is the request data after the client monitors the various performance data generated by the target server, and encapsulates the various performance data; the monitoring data is input into the target service load prediction model, so that the target service load prediction model can predict the load of the target server in the future time period according to the basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals, respectively, to obtain the corresponding target load prediction value; according to the size relationship between the target load prediction value and the preset load threshold, formulate and execute the corresponding scheduling strategy of increasing or decreasing the number of service instances to optimize service scheduling. It can be seen that by comprehensively considering the basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals, the load of the target server in the future time period can be more accurately predicted, providing a reliable basis for scheduling decisions. Dynamically adjusting the number of service instances based on the comparison of accurate load prediction values and preset load thresholds helps to achieve reasonable allocation and efficient utilization of resources and avoid waste or insufficient resources. Timely adjustment of scheduling strategies according to load conditions can reduce system instability factors caused by excessive or low loads, and improve the overall stability and reliability of the system. By optimizing service scheduling, we can ensure that services can respond to and process requests in a timely manner, thereby improving client satisfaction and service quality. We can quickly respond to changes in server performance, the influence of time factors, and abnormal situations, making the system more adaptable and flexible. By using information such as abnormal detection signals, we can detect potential problems in advance and take corresponding scheduling strategies to prevent them, thereby reducing the risk of failures. Based on model prediction and analysis, we can predict server loads for a period of time in the future, arrange service scheduling for each server node in advance, dynamically adjust the number of service instances, realize resource automation, and realize intelligent service scheduling decision-making process, reducing the uncertainty of human intervention.
[0095] Reference Figure 4 As shown, the embodiment of the present invention discloses a method for training a target service load prediction model. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically:
[0096] Step S21: Input the training data into the stacked long short-term memory network model so as to pass through the embedding layer of the stacked long short-term memory network model.
[0097] In this embodiment, in the implementation process of the previous invention embodiment, it includes using training data to specifically train the initial service load prediction model to obtain the target service load prediction model. It should be noted that the initial service load prediction model is a stacked long short-term memory network model for capturing feature dependencies under time series. Specifically, in this embodiment, the specific model selection and the training process of each layer of the model are disclosed. This embodiment adopts a model called stacked LSTM (Stacked LSTM, where LSTM, Long Short-Term Memory, long short-term memory network) combined with the idea of integrated learning. Stacked LSTM improves the model's ability to capture long-term dependencies by increasing the depth of the network, which is very suitable for time series data prediction tasks.
[0098] Step S22: Determine whether the historical access peak period characteristics and historical abnormal access pattern characteristics in the training data are category characteristics. If so, convert the historical access peak period characteristics and historical abnormal access pattern characteristics into continuous vectors through the embedding layer to obtain corresponding target training data containing target historical access peak period characteristics and target historical abnormal access pattern characteristics, and perform moving average calculation and exponential smoothing calculation on the target training data to obtain characteristics that characterize the average utilization rate of server resources at each time point and exponential smoothing characteristics.
[0099] In this embodiment, in the embedding layer of the stacked long short-term memory network model, it is determined whether the input peak time period and abnormal access are category features. Category features are data features that cannot be directly expressed by numerical values but are described by different categories or labels. Since the input features acted on by the model of the present invention are all continuous vectors, the embedding layer can be used to convert them into continuous vectors to obtain target training data so that the model can correctly process and understand the category features.
[0100] Furthermore, by utilizing the time series characteristics (timestamps) of the target training data, average usage features are introduced during model training, namely, Moving Average (MA) and Exponential Smoothing (ES): they are used to capture historical trends in resource usage and help the model understand the relationship between the current state and past changes.
[0101] ;
[0102] ;
[0103] Among them, k represents the window size of the moving average, represents the smoothing coefficient, Indicates the resource usage rate at the i-th time point, i is less than or equal to t, Indicates the resource usage at the tth time point.
[0104] According to the above formulas, the average usage characteristics (MA) and exponential smoothing (ES) are calculated respectively. The calculation process of the average usage characteristics (MA) is as follows:
[0105] Determine a window size k, such as the data points for the past 24 hours.
[0106] For each time point t, calculate the average resource usage of the past k time points.
[0107] Calculate exponential smoothing (ES) as follows:
[0108] Initialize ES0 to the initial value of resource usage or set a default value.
[0109] Choose a smoothing factor , usually between 0 and 1, with values closer to 1 meaning more emphasis is placed on recent data.
[0110] We will assume that there are 24 consecutive hours of data points and choose a simplified window size of 2 for illustration purposes only.
[0111] The calculation results are shown in Table 6 below (only the calculation formula of the moving average (MA-2) is given here):
[0112] Table 6
[0113]
[0114] Step S23: The average utilization rate characteristics of the server resources, the exponential smoothing characteristics, the historical basic performance characteristics, the target historical access peak period characteristics and the target historical abnormal access pattern characteristics are used as input characteristics to train the long short-term memory network layer of the stacked long short-term memory network model to learn the time dependency between the average utilization rate characteristics of the server resources and the exponential smoothing characteristics, and to train the target stacked long short-term memory network layer to learn the correspondence between each feature and the load label, so as to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period.
[0115] In this embodiment, after the target training data in Table 6 is obtained, the specific steps of using the target training data to train the model are as follows:
[0116] Input features: resource usage, peak hours, abnormal access, moving average (MA), exponential smoothing (ES).
[0117] Target variable: The predicted value of the machine load at a certain point in the future.
[0118] Input layer: receives the processed feature vector.
[0119] Embedding layer (optional): If peak hours and abnormal visits are still categorical features, an embedding layer can be used to convert them into continuous vectors.
[0120] LSTM layer: The first layer of LSTM processes time series features and captures the temporal dependencies in the sequence.
[0121] Dropout (regularization) layer: prevents overfitting and is usually set between 0.2 and 0.5.
[0122] Stacked LSTM layers: Multiple layers of LSTM can be added, with each layer performing further abstraction on the output of the previous layer.
[0123] Fully connected layer: The output of the last LSTM layer is converted into a predicted value through a fully connected layer. The activation function can be linear because this is a regression problem.
[0124] Train multiple stacked LSTM models with different initialization or architecture fine-tuning. Take the average or weighted average of the prediction results of these models to obtain the final prediction output, and combine all models to get the final target service load prediction model.
[0125] It can be seen that the introduction of moving average (MA) and exponential smoothing (ES) technology effectively captures resource usage trends and improves the model's ability to understand and predict time series data. The combination of advanced long short-term memory networks (LSTMs), especially stacked LSTM models, enhances the model's ability to capture long-term dependencies, which is particularly suitable for complex time series predictions. By training multiple stacked LSTM models and integrating their prediction results, the stability and accuracy of the prediction are improved, the risk of overfitting of a single model is reduced, and the reliability of decision-making is improved.
[0126] Reference Figure 5 As shown, the present invention also discloses a distributed system service scheduling optimization device, which is applied to a service management center, including:
[0127] The data acquisition module 11 is used to acquire the HTTP request sent by the client to parse and obtain monitoring data including basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals of the target server; wherein the HTTP request is request data after the client monitors the various performance data generated by the target server and encapsulates the various performance data;
[0128] The load prediction module 12 is used to input the monitoring data into the target service load prediction model, so as to predict the load of the target server in the future time period according to the basic performance index, the extended performance index, the time-related influencing factors, and the abnormal detection signal through the target service load prediction model, so as to obtain the corresponding target load prediction value;
[0129] The scheduling optimization module 13 is used to formulate and execute a scheduling strategy for increasing or decreasing the number of corresponding service instances according to the size relationship between the target load prediction value and the preset load threshold, so as to optimize service scheduling.
[0130] It can be seen that the present application discloses obtaining the HTTP request sent by the client to parse and obtain monitoring data containing the basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals of the target server; wherein the HTTP request is the request data after the client monitors the various performance data generated by the target server, and encapsulates the various performance data; the monitoring data is input into the target service load prediction model, so that the target service load prediction model can predict the load of the target server in the future time period according to the basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals, respectively, to obtain the corresponding target load prediction value; according to the size relationship between the target load prediction value and the preset load threshold, formulate and execute the corresponding scheduling strategy of increasing or decreasing the number of service instances to optimize service scheduling. It can be seen that by comprehensively considering the basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals, the load of the target server in the future time period can be more accurately predicted, providing a reliable basis for scheduling decisions. Dynamically adjusting the number of service instances based on the comparison of accurate load prediction values and preset load thresholds helps to achieve reasonable allocation and efficient utilization of resources and avoid waste or insufficient resources. Timely adjustment of scheduling strategies according to load conditions can reduce system instability factors caused by excessive or low loads, and improve the overall stability and reliability of the system. By optimizing service scheduling, we can ensure that services can respond to and process requests in a timely manner, thereby improving client satisfaction and service quality. We can quickly respond to changes in server performance, the influence of time factors, and abnormal situations, making the system more adaptable and flexible. By using information such as abnormal detection signals, we can detect potential problems in advance and take corresponding scheduling strategies to prevent them, thereby reducing the risk of failures. Based on model prediction and analysis, we can predict server loads for a period of time in the future, arrange service scheduling for each server node in advance, dynamically adjust the number of service instances, realize resource automation, and realize intelligent service scheduling decision-making process, reducing the uncertainty of human intervention.
[0131] Furthermore, the present application also discloses an electronic device. Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0132] Figure 6 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the distributed system service scheduling optimization method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0133] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0134] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0135] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0136] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the processor 21 on the massive data 223 in the memory 22, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the distributed system service scheduling optimization method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to data received by the electronic device and transmitted from an external device, the data 223 can also include data collected by its own input and output interface 25, etc.
[0137] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the above-disclosed distributed system service scheduling optimization method is implemented. The specific steps of the method can refer to the corresponding contents disclosed in the above-disclosed embodiments, and will not be repeated here.
[0138] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0139] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. The steps of the method or algorithm described in conjunction with the embodiments disclosed herein can be implemented directly with hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory RAM (Random Access Memory), memory, read-only memory ROM (Read Only Memory), electrically programmable EPROM (Electrically Programmable Read Only Memory), electrically erasable programmable EEPROM (ElectricErasable Programmable Read Only Memory), register, hard disk, removable disk, CD-ROM (CompactDisc-Read Only Memory), or any other form of storage medium known in the technical field.
[0140] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0141] The scheme provided by the present invention is introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A distributed system service scheduling optimization method, characterized in that: Applied to the service management center, including: Obtaining an HTTP request sent by a client to parse and obtain monitoring data including basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals of a target server; wherein the HTTP request is request data after the client monitors various performance data generated by the target server and encapsulates the various performance data; Input the monitoring data into the target service load prediction model, so as to predict the load of the target server in the future time period according to the basic performance index, the extended performance index, the time-related influencing factors, and the abnormal detection signal through the target service load prediction model, so as to obtain the corresponding target load prediction value; According to the relationship between the target load prediction value and the preset load threshold, formulate and execute a corresponding scheduling strategy for increasing or decreasing the number of service instances to optimize service scheduling; Before inputting the monitoring data into the target service load prediction model, the method further includes: The initial service load prediction model is trained using the collected historical monitoring data including historical basic performance indicators, historical extended performance indicators, historical time-related influencing factors, and historical abnormal detection signals of each server, so as to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period; The method uses the collected historical monitoring data including historical basic performance indicators, historical extended performance indicators, historical time-related influencing factors, and historical abnormal detection signals of each server to train the initial service load prediction model to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period, including: The historical monitoring data is sequentially subjected to data cleaning processing, missing value processing, feature conversion processing, and feature dimension reduction processing to obtain training data; wherein the training data includes a load label corresponding to the historical monitoring data; Inputting the training data into the initial service load prediction model, so that the initial service load prediction model performs moving average calculation and exponential smoothing calculation on the training data according to the timestamp information of the historical monitoring data, so as to obtain the average utilization rate characteristics of the server resources at each time point and the exponential smoothing characteristics; The average utilization rate feature of server resources, exponential smoothing feature, historical basic performance feature, historical time-related influencing factor feature and historical anomaly detection signal feature are used as input features to train the initial service load prediction model to learn the association between features and the correspondence between features and load labels, so as to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period; The initial service load prediction model is a stacked long short-term memory network model for capturing feature dependencies under time series; The step of inputting the training data into the initial service load prediction model so that the initial service load prediction model performs moving average calculation and exponential smoothing calculation on the training data according to the timestamp information of the historical monitoring data to obtain characteristics of average usage rate of server resources at each time point and exponential smoothing characteristics, including: The training data is input into the stacked long short-term memory network model, so as to determine whether the historical access peak time period characteristics and the historical abnormal access pattern characteristics in the training data are category characteristics through the embedding layer of the stacked long short-term memory network model. If so, the historical access peak time period characteristics and the historical abnormal access pattern characteristics are converted into continuous vectors through the embedding layer to obtain corresponding target training data containing target historical access peak time period characteristics and target historical abnormal access pattern characteristics, and moving average calculation and exponential smoothing calculation are performed on the target training data to obtain characteristics representing the average utilization rate of server resources at each time point and exponential smoothing characteristics; Accordingly, the server resource average utilization rate feature, exponential smoothing feature, historical basic performance feature, historical time-related influencing factor feature and historical abnormal detection signal feature are used as input features to train the initial service load prediction model to learn the association between features and the correspondence between features and load labels, so as to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period, including: The average utilization rate characteristics of server resources, exponential smoothing characteristics, historical basic performance characteristics, the target historical access peak period characteristics and the target historical abnormal access pattern characteristics are used as input features to train the long short-term memory network layer of the stacked long short-term memory network model to learn the time dependency between the average utilization rate characteristics of server resources and the exponential smoothing characteristics, and to train the target stacked long short-term memory network layer to learn the correspondence between each feature and the load label, so as to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period.
2. The distributed system service scheduling optimization method according to claim 1, characterized in that: The obtaining of the HTTP request sent by the client includes: The HTTP request client encapsulates the uploaded request based on the basic performance indicators that characterize the health status of the target server, the extended performance indicators of the cache hit rate, the time-related influencing factors during the access peak period, and the abnormal detection signals as monitoring data; wherein the extended performance indicators include the disk read-write ratio, the number of active connections, and the number of threads; the time-related influencing factors include working days, non-working days, and holidays; the abnormal detection signals include the fault marks and abnormal access patterns of the target server.
3. The distributed system service scheduling optimization method according to claim 1, characterized in that: The formulating and executing a scheduling strategy for increasing or decreasing the number of corresponding service instances according to the size relationship between the target load prediction value and the preset load threshold value to optimize service scheduling includes: Setting a load upper limit threshold and a load lower limit threshold as preset load thresholds, and comparing the magnitude relationship between the target load prediction value and the preset load thresholds to obtain a corresponding comparison result; If the comparison result is that the target load prediction value is greater than the load upper limit threshold, triggering sending an instruction to increase the number of service instances to the distributed service node, so as to formulate a corresponding scheduling strategy and optimize service scheduling; If the comparison result is that the target load prediction value is less than the load lower limit threshold, an instruction to reduce the number of service instances is triggered to be sent to the target server, so as to formulate a corresponding scheduling strategy and optimize service scheduling.
4. A distributed system service scheduling optimization device, characterized in that: Applied to the service management center, including: A data acquisition module is used to acquire the HTTP request sent by the client to parse and obtain monitoring data including basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals of the target server; wherein the HTTP request is request data after the client monitors the various performance data generated by the target server and encapsulates the various performance data; A load prediction module, used to input the monitoring data into a target service load prediction model, so as to predict the load of the target server in a future time period according to basic performance indicators, extended performance indicators, time-related influencing factors, and abnormal detection signals through the target service load prediction model, so as to obtain a corresponding target load prediction value; A scheduling optimization module, used to formulate and execute a scheduling strategy for increasing or decreasing the number of corresponding service instances according to the size relationship between the target load prediction value and the preset load threshold, so as to optimize service scheduling; The distributed system service scheduling optimization device is used to use the collected historical monitoring data including historical basic performance indicators, historical extended performance indicators, historical time-related influencing factors, and historical abnormal detection signals of each server to perform model training on the initial service load prediction model, so as to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period; The distributed system service scheduling optimization device is specifically used to perform data cleaning processing, missing value processing, feature conversion processing and feature dimension reduction processing on the historical monitoring data in sequence to obtain training data; wherein the training data includes a load label corresponding to the historical monitoring data; the training data is input into the initial service load prediction model so that the initial service load prediction model performs moving average calculation and exponential smoothing calculation on the training data according to the timestamp information of the historical monitoring data to obtain the average utilization rate characteristics and exponential smoothing characteristics of the server resources at each time point; the average utilization rate characteristics of the server resources, the exponential smoothing characteristics, the historical basic performance characteristics, the historical time-related influencing factor characteristics and the historical abnormal detection signal characteristics are used as input features to train the initial service load prediction model to learn the association relationship between features and the correspondence relationship between features and load labels, so as to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period; the initial service load prediction model is a stacked long short-term memory network model for capturing feature dependencies under time series; The distributed system service scheduling optimization device is specifically used to input the training data into the stacked long short-term memory network model, so as to determine whether the historical access peak time period characteristics and historical abnormal access pattern characteristics in the training data are category characteristics through the embedding layer of the stacked long short-term memory network model. If so, the historical access peak time period characteristics and historical abnormal access pattern characteristics are converted into continuous vectors through the embedding layer to obtain corresponding target training data containing target historical access peak time period characteristics and target historical abnormal access pattern characteristics, and perform moving average calculation and exponential smoothing calculation on the target training data to obtain the server resource average utilization rate characteristics and exponential smoothing characteristics that characterize each time point; the server resource average utilization rate characteristics, exponential smoothing characteristics, historical basic performance characteristics, the target historical access peak time period characteristics and the target historical abnormal access pattern characteristics are used as input features to train the long short-term memory network layer of the stacked long short-term memory network model to learn the time dependence between the server resource average utilization rate characteristics and the exponential smoothing characteristics, and train the target stacked long short-term memory network layer to learn the correspondence between each feature and the load label, so as to obtain a target service load prediction model for predicting the load prediction values corresponding to each indicator data in the future time period.
5. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the steps of the distributed system service scheduling optimization method as described in any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the distributed system service scheduling optimization method as described in any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Self-adaptive load balancing method suitable for data intermediate station service grid
CN117793115A
