A performance optimization method, device and equipment of a service system and a storage medium
By monitoring and analyzing anomalies in business systems, identifying performance bottlenecks, and formulating load weight allocation strategies, the problem of quickly locating and optimizing performance issues in existing technologies has been solved, achieving efficient performance optimization of business systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
- Filing Date
- 2021-05-19
- Publication Date
- 2026-05-01
AI Technical Summary
Existing business systems often struggle to quickly locate and accurately resolve performance issues under complex business logic, especially when performance bottlenecks occur, making effective performance optimization difficult.
By monitoring for anomalies in the business system, identifying performance bottlenecks, conducting correlation analysis, determining load weight allocation optimization strategies, and implementing load balancing configurations, anomaly detection and cumulative anomaly detection are performed using indicator prediction models and random forest regression algorithms, and targeted weight optimization strategies are formulated.
It enables automatic identification and precise optimization of performance issues in business systems, improves the targeting and effectiveness of performance bottleneck optimization, and enhances the overall performance of the business system.
Smart Images

Figure CN115373830B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computers, and more particularly to a method, apparatus, device, and storage medium for optimizing the performance of a business system. Background Technology
[0002] Currently, business processes are typically handled using business systems, such as electronic payment systems or e-commerce systems.
[0003] In existing business systems, a single system often comprises one or more services, each service containing multiple instances. The overall performance of the services within a business system, as well as the performance of each instance within those services, is crucial for the system's normal operation. When performance issues arise under complex business logic, it is often difficult to quickly locate and accurately resolve these problems. Summary of the Invention
[0004] To address the aforementioned technical problems, embodiments of this application aim to provide a method, apparatus, device, and storage medium for optimizing the performance of a business system.
[0005] The technical solution of this application is implemented as follows:
[0006] Firstly, a performance optimization method for a business system is provided, the method including:
[0007] Monitor the business systems for any anomalies;
[0008] If it exists, then the performance bottleneck of the business system is identified, wherein the performance bottleneck is specifically a key node that affects the performance optimization of the business system;
[0009] Correlation analysis was performed on the performance bottlenecks to determine the load weight allocation optimization strategy;
[0010] The load weight allocation optimization strategy is executed to configure load balancing.
[0011] In the above scheme, correlation analysis is performed on the performance bottleneck to determine the load weight allocation optimization strategy, including:
[0012] Based on the time when the performance bottleneck occurs, obtain the service's metric data within a preset time range and the metric data of at least two instances under the service;
[0013] Based on the aforementioned indicator data, a correlation analysis is performed to determine the first correlation coefficient between each instance and the service;
[0014] Based on the location of the performance bottleneck, determine the corresponding weight optimization strategy;
[0015] Based on the weight optimization strategy and the first correlation coefficient, at least two optimized weight values are determined for the at least two instances.
[0016] The load weight allocation optimization strategy is determined based on the at least two optimized weight values.
[0017] In the above scheme, based on the location of the performance bottleneck, a corresponding weight optimization strategy is determined, including:
[0018] If the performance bottleneck is located on the service, the weight optimization strategy is determined by: calculating the difference between the first constant and the first correlation coefficient between each instance and the service to obtain the optimization weight value corresponding to each instance;
[0019] If the performance bottleneck is located only on an instance, determining the weight optimization strategy includes: calculating the product of the original weight value of each instance and the first correlation coefficient between each instance and the service to obtain the optimized weight value corresponding to each instance; wherein, the original weight value is the weight value corresponding to each instance before the performance bottleneck is discovered.
[0020] In the above scheme, the weight optimization strategy further includes: when the first correlation coefficient is greater than or equal to 1 or is abnormal, setting the first correlation coefficient to 0.99;
[0021] When the first correlation coefficient is less than or equal to 0, the first correlation coefficient is set to 0.01.
[0022] In the above scheme, the indicator data includes at least one indicator data;
[0023] The step of performing correlation analysis based on the indicator data to determine the first correlation coefficient between each instance and the service includes:
[0024] Perform correlation calculations on at least one indicator data to obtain at least one second correlation coefficient between each instance and the service;
[0025] When the indicator data includes one type of indicator data, the second correlation coefficient is used as the first correlation coefficient;
[0026] When the indicator data includes at least two types of indicator data, the average of at least two second correlation coefficients between each instance and the service is taken to obtain the first correlation coefficient between each instance and the service.
[0027] In the above scheme, the indicator data includes response time and / or throughput.
[0028] The above solution includes monitoring for anomalies in the business system, including:
[0029] The performance metrics of the first service or the first instance in the business system are predicted using the metric prediction model to obtain the predicted metric data.
[0030] Calculate the residual between the actual indicator data and the predicted indicator data of the first service or the first instance;
[0031] If the residual between the actual indicator data and the predicted indicator data of the first service exceeds the residual threshold, the first service is determined to be abnormal.
[0032] If the residual between the actual indicator data and the predicted indicator data of the first instance exceeds the residual threshold, the first instance is determined to be abnormal.
[0033] In the above scheme, if a performance bottleneck exists, then the performance bottleneck of the business system is determined, including:
[0034] When the first service or the first instance is abnormal, the cumulative abnormal value of the first service or the first instance within a preset time period is recorded; wherein, the first service and the first instance can be any service and any instance in the business system;
[0035] If the cumulative abnormal value of the first service is greater than or equal to the first abnormal threshold, a performance bottleneck is determined to have occurred and the location of the performance bottleneck is the first service.
[0036] If the cumulative abnormal value of the first instance is greater than or equal to the second abnormal threshold, a performance bottleneck is determined to have occurred, and the location of the performance bottleneck is the first instance.
[0037] The above solution also includes monitoring for anomalies in the business system, including:
[0038] A predictive model for indicators was constructed using the random forest regression algorithm.
[0039] The indicator prediction model is trained using grid search and cross-validation.
[0040] When the prediction result of the indicator prediction model does not meet the model evaluation conditions, the parameters of the indicator prediction model are optimized.
[0041] When the prediction results of the indicator prediction model meet the model evaluation conditions, the training of the indicator prediction model is considered complete.
[0042] Secondly, a device for optimizing the performance of a business system is provided, the device comprising:
[0043] The monitoring module is used to monitor whether there are any anomalies in the business system;
[0044] The processing module is used to determine the performance bottleneck of the business system if an anomaly is found, wherein the performance bottleneck is specifically a key node that affects the performance optimization of the business system.
[0045] The processing module is also used to perform correlation analysis on the performance bottleneck and determine the load weight allocation optimization strategy.
[0046] The processing module is also used to execute the load weight allocation optimization strategy to perform load balancing configuration.
[0047] Thirdly, an electronic device is provided, comprising: a processor and a memory configured to store a computer program capable of running on the processor.
[0048] Wherein, when the processor is configured to run the computer program, it performs the steps of any of the methods described above.
[0049] Fourthly, a computer storage medium is provided that stores a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the aforementioned method.
[0050] This application discloses a method, apparatus, device, and storage medium for optimizing the performance of a business system. When an anomaly in the business system's performance is detected, performance bottlenecks are identified. Through correlation analysis of different factors affecting these bottlenecks, a load weight allocation optimization strategy is determined, and load balancing configuration is executed according to this strategy. This allows for automatic identification, location, and precise optimization of performance issues across all services and instances within the business system, thereby achieving overall performance optimization for the entire business system. Attached Figure Description
[0051] Figure 1 This is a schematic diagram of the first process of the performance optimization method for the business system in the embodiments of this application;
[0052] Figure 2 This is a schematic diagram of the second process of the performance optimization method for the business system in the embodiments of this application;
[0053] Figure 3 This is a graph showing the change of indicator data over time for instances A, B, and C and service 1 in this embodiment of the application.
[0054] Figure 4 This is a schematic diagram of the third process of the performance optimization method for the business system in the embodiments of this application;
[0055] Figure 5 This is a schematic diagram of the process for anomaly detection of indicator data based on the 3-Sigma model in an embodiment of this application;
[0056] Figure 6This is a schematic diagram illustrating the specific process of constructing an indicator prediction model based on the random forest regression algorithm and training the model to obtain the indicator prediction model in this embodiment of the application.
[0057] Figure 7 This is a schematic diagram of the fourth process of the performance optimization method for the business system in the embodiments of this application;
[0058] Figure 8 This is a schematic diagram of the process for preprocessing the original indicator data in the embodiments of this application;
[0059] Figure 9 This is a flowchart illustrating the bottleneck identification process in this application embodiment;
[0060] Figure 10 This application embodiment illustrates the process of optimizing the performance of a service or instance that has been found to have a performance bottleneck.
[0061] Figure 11 This is a flowchart illustrating the performance bottleneck identification and optimization process in the embodiments of this application.
[0062] Figure 12 This is a flowchart illustrating the system performance tuning method in the embodiments of this application.
[0063] Figure 13 This is a schematic diagram of the composition structure of the performance optimization device for the business system in the embodiments of this application;
[0064] Figure 14 This is a schematic diagram of the composition structure of the performance optimization device for the business system in this application embodiment. Detailed Implementation
[0065] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.
[0066] Figure 1 This is a first flowchart illustrating the performance optimization method for a business system in an embodiment of this application, as shown below. Figure 1 As shown, specific methods for optimizing the performance of a business system may include:
[0067] Step 101: Monitor whether there are any anomalies in the business system.
[0068] For example, anomaly detection algorithms can be used to monitor the performance of a business system in real time and determine whether there are any anomalies in the business system.
[0069] Step 102: If it exists, then determine the performance bottleneck of the business system, wherein the performance bottleneck is specifically a key node that affects the performance optimization of the business system.
[0070] In some embodiments, determining the performance bottleneck of the business system includes: determining the time of occurrence of the performance bottleneck and the location of its occurrence. The time of occurrence of the performance bottleneck is used to pinpoint the time when the system performance problem occurs, and abnormal data is extracted and analyzed based on this time. The location of the performance bottleneck is used to locate the location where the system performance problem occurs, allowing for targeted optimization of system performance based on the location of the problem. For example, the location of the performance bottleneck can be a service or a specific instance.
[0071] Step 103: Perform correlation analysis on the performance bottleneck to determine the load weight allocation optimization strategy.
[0072] Since a business system comprises a whole service and multiple instances within it, the performance correlation between the whole service and each instance can provide a basis for system performance optimization. Here, correlation analysis of performance bottlenecks involves analyzing the correlation between the performance data of the whole service and each instance when a performance bottleneck occurs. Based on the results of this analysis, a load weight allocation optimization strategy can be formulated to specifically optimize the load distribution of each instance within the service, thereby achieving performance optimization of the business system.
[0073] Step 104: Execute the load weight allocation optimization strategy to configure load balancing.
[0074] For example, a load weighting optimization strategy may include a weighting value for each instance. The load balancer configures load balancing for instances under the service based on this weighting value, thereby optimizing the performance of the service and instances, and ultimately improving the performance of the entire business system.
[0075] Here, the execution entity for steps 101 to 104 can be the processor of an electronic device.
[0076] To better illustrate the purpose of this application, further examples are provided based on the embodiments described above. Figure 2 This is a schematic diagram of the second process of the performance optimization method for the business system in this application embodiment, as shown below. Figure 2 As shown, the specific methods for performance optimization of business systems include:
[0077] Step 201: Monitor whether there are any anomalies in the business system.
[0078] In practical applications, anomaly detection algorithms are often used to monitor the performance of business systems in real time.
[0079] Step 202: If it exists, then identify the performance bottleneck of the business system, wherein the performance bottleneck is specifically a key node that affects the performance optimization of the business system.
[0080] Here, the performance bottleneck is specifically the key node that affects the performance optimization of the business system. By identifying the performance bottleneck, the key factors affecting the performance of the business system can be accurately located, providing a foundation for subsequent performance optimization of the business system.
[0081] When the performance anomalies of a service or an instance of a service in the system reach a certain level, it indicates that the system has a performance bottleneck. In some embodiments, after identifying a performance bottleneck, the method further includes: triggering a performance optimization engine to perform the following performance optimization operations.
[0082] Step 203: Based on the time when the performance bottleneck occurs, obtain the indicator data of the service within a preset time range and the indicator data of at least two instances under the service.
[0083] Here, the acquired metric data refers to the metric data of the service and all instances under that service, wherein the service includes at least two instances. For example, the metric data is time-series data of the performance metrics of the service or instance in the system.
[0084] In some embodiments, obtaining metric data for a service within a preset time range and metric data for at least two instances under the service includes: obtaining the metric data for the service within the preset time range and the raw metric data for at least two instances under the service; preprocessing the raw metric data to obtain preprocessed metric data. The preprocessing includes, but is not limited to, handling missing data values and / or handling data noise.
[0085] In some embodiments, the preset time range is defined as acquiring metric data for the service and all instances within a preset time range prior to the moment when the performance bottleneck is discovered, with the moment of discovery as the endpoint. For example, if the moment when the performance bottleneck is discovered is 70 and the preset time range is 60, then metric data within the time period from 10 to 70 is acquired.
[0086] When a performance bottleneck occurs, the system acquires the service's metrics data and the metrics data of all instances under the service. Correlation analysis of the metrics data provides a data foundation for subsequent optimization of the performance bottleneck.
[0087] Step 204: Perform correlation analysis based on the indicator data to determine the first correlation coefficient between each instance and the service.
[0088] Here, the purpose of correlation analysis is to determine the degree of correlation between each instance and service metric data within a preset time range. This correlation is represented by the first correlation coefficient between the instance and the service, derived from the correlation analysis. A higher correlation coefficient indicates a greater correlation between the instance and service performance, and a greater impact of the instance's metrics on the service's metrics. This allows us to identify the main factors affecting performance bottlenecks and determine the direction for weight optimization. By understanding the correlation between instance and service performance and identifying the main factors influencing performance bottlenecks, we can more effectively adjust the weight parameters of subsequent instances, resulting in more effective performance bottleneck optimization.
[0089] For example, in service 1 there are instances A, B, and C. Figure 3 The graphs show the performance metrics of instances A, B, C, and service 1 over time (0-100). Assuming the performance bottleneck was discovered at time 70 and the preset duration is 60, performance metrics for instances A, B, C, and service 1 are collected over a period of 10-70. Based on this data, the first correlation coefficients RA (for instance A and service 1), RB (for instance B and service 1), and RC (for instance C and service 1) are calculated. The higher the similarity of the trends between the two curves, the greater their correlation, and the larger the corresponding correlation coefficient. Figure 3 Among them, instance A has the highest similarity to service 1.
[0090] In some embodiments, the method for calculating the first correlation coefficient between each instance and the service includes, but is not limited to, obtaining it using the Spearman correlation coefficient calculation formula or the Pearson correlation coefficient calculation formula.
[0091] In some embodiments, the indicator data includes at least one indicator data; the step of performing correlation analysis based on the indicator data to determine a first correlation coefficient between each instance and the service includes:
[0092] The correlation of at least one indicator data is calculated to obtain at least one second correlation coefficient between each instance and the service; when the indicator data includes one indicator data, the second correlation coefficient is used as the first correlation coefficient; when the indicator data includes at least two indicator data, the average of at least two second correlation coefficients between each instance and the service is taken to obtain the first correlation coefficient between each instance and the service.
[0093] One metric corresponds to one performance level. By analyzing the correlation between various metrics of services and instances, the degree of correlation between services and instances can be more comprehensively characterized.
[0094] In some embodiments, the metric data includes response time and / or throughput, but is not limited to these two metrics.
[0095] By performing correlation analysis on one or more metrics data of the service and each instance under the service in the period before the bottleneck occurs, the degree of correlation between the metric data of each instance and the service can be obtained, which provides a basis for subsequent weight optimization and helps to improve the optimization effect.
[0096] Step 205: Determine the corresponding weight optimization strategy based on the location of the performance bottleneck.
[0097] Here, the location of the performance bottleneck accurately identifies the specific service or instance experiencing the performance problem. By implementing different weighted optimization strategies for performance bottlenecks occurring in different locations, targeted optimization of these bottlenecks can be achieved.
[0098] In some embodiments, a corresponding weight optimization strategy is determined based on the location of the performance bottleneck, including:
[0099] If the performance bottleneck is located on the service, the weight optimization strategy is determined by: calculating the difference between the first constant and the first correlation coefficient between each instance and the service to obtain the optimization weight value corresponding to each instance;
[0100] If the performance bottleneck is located only on an instance, determining the weight optimization strategy includes: calculating the product of the original weight value of each instance and the first correlation coefficient between each instance and the service to obtain the optimized weight value corresponding to each instance; wherein, the original weight value is the weight value corresponding to each instance before the performance bottleneck is discovered.
[0101] In some embodiments, the weight optimization strategy further includes: when the first correlation coefficient is greater than or equal to 1 or is abnormal, setting the first correlation coefficient to 0.99; when the first correlation coefficient is less than or equal to 0, setting the first correlation coefficient to 0.01.
[0102] For example, if the performance bottleneck is located on the service, the weight optimization strategy is determined as follows: the optimization weight value corresponding to instance A is determined to be Wa = 1 - RA, the optimization weight value corresponding to instance B is Wb = 1 - RB, and the optimization weight value corresponding to instance C is Wc = 1 - RC. The ratio of the optimization weight values of each instance is: W = (1 - RA):(1 - RB):(1 - RC); where RA, RB, and RC are the first correlation coefficients between instance A, instance B, and instance C and service 1, respectively.
[0103] The performance bottleneck is located only at the instance level. The weight optimization strategy is determined as follows: the optimization weight value for instance A is Wa = Wa' × RA, the optimization weight value for instance B is Wb = Wb' × RB, and the optimization weight value for instance C is Wc = Wc' × RC. The ratio of the optimization weight values for each instance is: W = (Wa' × RA):(Wb' × RB):(Wc' × RC); where RA, RB, and RC are the first correlation coefficients between instance A, instance B, and instance C and service 1, respectively. Wa', Wb', and Wc' are the weight values of instance A, instance B, and instance C before the performance bottleneck was discovered, respectively.
[0104] The aforementioned weight optimization strategy also includes: when the first correlation coefficient is greater than or equal to 1 or is abnormal, setting the first correlation coefficient to 0.99; when the first correlation coefficient is less than or equal to 0, setting the first correlation coefficient to 0.01.
[0105] By applying different weighting optimization strategies to performance bottlenecks occurring on the service and those occurring on the instance, performance bottlenecks can be optimized in a targeted manner, thereby improving the accuracy of bottleneck optimization.
[0106] Step 206: Determine at least two optimized weight values corresponding to the at least two instances based on the weight optimization strategy and the first correlation coefficient.
[0107] Here, by substituting the first correlation coefficient between each instance and the service obtained in step 206 into the weight optimization strategy determined in step 205, the optimized weight value of each instance can be obtained.
[0108] Step 207: Determine the load weight allocation optimization strategy based on the at least two optimized weight values.
[0109] The optimization weight value corresponding to each instance is used to distribute the load to each instance when performing bottleneck optimization.
[0110] Step 208: Execute the load weight allocation optimization strategy to configure load balancing.
[0111] Here, by optimizing the weight values of at least two instances, load balancing is configured for at least two instances under the service, thereby optimizing the performance of the service and instances and thus optimizing the performance of the entire system.
[0112] In some embodiments, executing the load weight allocation optimization strategy for load balancing configuration includes: automatically configuring the load of each instance according to the optimization weight value, and restarting the load balancer to make the configuration effective.
[0113] The technical solution of this application can improve the targeting of performance bottleneck optimization by formulating different weight optimization strategies for performance bottlenecks occurring on services and performance bottlenecks occurring on instances. By conducting correlation analysis on the historical indicator data of the service and each instance under the service in the period before the bottleneck occurs, a basis can be provided for subsequent weight optimization, thereby improving the effect of weight optimization and the effectiveness of bottleneck optimization. This achieves effective optimization of performance bottlenecks and thus optimizes the performance of the business system.
[0114] Here, the entity executing steps 201 to 208 can be the processor of an electronic device.
[0115] To better illustrate the purpose of this application, further examples are provided based on the above embodiments. Figure 4 This is a schematic diagram of the third process of the performance optimization method for the business system in this application embodiment, as shown below. Figure 4 As shown, the specific methods for performance optimization of business systems include:
[0116] Step 401: Monitor whether there are any anomalies in the business system.
[0117] In some embodiments, monitoring whether a business system is abnormal includes: using an indicator prediction model to predict the performance indicators of a first service or a first instance in the business system to obtain predicted indicator data; calculating the residual between the actual indicator data and the predicted indicator data of the first service or the first instance; if the residual between the actual indicator data and the predicted indicator data of the first service exceeds a residual threshold, determining that the first service is abnormal; if the residual between the actual indicator data and the predicted indicator data of the first instance exceeds a residual threshold, determining that the first instance is abnormal.
[0118] For example, to determine whether the residual exceeds the residual threshold, one can compare the residual value with the value of a fixed value to determine whether the residual exceeds the residual threshold; another method is to establish a 3-Sigma model to determine whether the residual exceeds the residual threshold.
[0119] For example, Figure 5This paper demonstrates a specific process for anomaly detection of indicator data based on a 3-Sigma model. The process includes the following steps: Step 501: Train a 3-Sigma model conforming to a normal distribution using the historical residuals between the predicted and actual indicator data from the prediction model; Step 502: Input the residual values of the actual and predicted indicator data from the new real-time indicator data into the model; Step 503: Determine whether the residuals are outside the 3σ range in the 3-Sigma model; Step 504: If the residuals are outside the 3σ range, the residuals are considered to exceed the residual threshold, and the actual indicator data is considered anomalous; Step 505: If the residuals are within the 3σ range, the residuals are considered to be within the residual threshold, and the actual indicator data is considered normal. The sensitivity for anomaly detection can be adjusted by changing the factor of σ. If the actual indicator data is normal, the anomaly detection result is normal; if the actual indicator data is anomalous, the anomaly detection result is anomalous.
[0120] In some embodiments, monitoring for anomalies in the business system further includes:
[0121] An indicator prediction model is constructed using a random forest regression algorithm; the indicator prediction model is trained using grid search and cross-validation; when the prediction results of the indicator prediction model do not meet the model evaluation conditions, the parameters of the indicator prediction model are optimized; when the prediction results of the indicator prediction model meet the model evaluation conditions, the training of the indicator prediction model is considered complete.
[0122] For example, Figure 6 This paper demonstrates a specific process for constructing and training an indicator prediction model based on the random forest regression algorithm. The process includes the following steps:
[0123] Step 601: Construct an indicator prediction model using the random forest regression algorithm; Step 602: Train the indicator prediction model using grid search and cross-validation; Step 603: Determine whether the prediction results of the indicator prediction model meet the model evaluation conditions. If not, return to step 602; Step 604: If the prediction results of the indicator prediction model meet the model evaluation conditions, then the training of the indicator prediction model is considered complete.
[0124] Step 402: When the first service or the first instance is abnormal, record the cumulative abnormal value of the first service or the first instance within a preset time period; wherein, the first service and the first instance are any service and any instance in the business system.
[0125] Step 403: If the cumulative abnormal value of the first service is greater than or equal to the first abnormal threshold, determine that a performance bottleneck has occurred and that the location of the performance bottleneck is the first service.
[0126] Step 404: If the cumulative abnormal value of the first instance is greater than or equal to the second abnormal threshold, determine that a performance bottleneck has occurred and that the location of the performance bottleneck is the first instance.
[0127] Here, the purpose of cumulative time anomaly detection for abnormal services or instances is to filter out occasional abnormal services or instances and identify those that truly represent performance bottlenecks. Identifying and pinpointing performance bottlenecks is crucial for discovering system performance limitations and providing a foundation for subsequent performance bottleneck optimization.
[0128] Step 405: Based on the time when the performance bottleneck occurs, obtain the indicator data of the service within a preset time range and the indicator data of at least two instances under the service.
[0129] Here, the acquired metric data refers to the metric data of the service and all instances under that service, wherein the service includes at least two instances. For example, the metric data is time-series data of the performance metrics of the service or instance in the system.
[0130] In some embodiments, obtaining metric data for a service within a preset time range and metric data for at least two instances under the service includes: obtaining the metric data for the service within the preset time range and the raw metric data for at least two instances under the service; preprocessing the raw metric data to obtain preprocessed metric data. The preprocessing includes, but is not limited to, handling missing data values and / or handling data noise.
[0131] In some embodiments, the preset time range is defined as acquiring metric data for the service and all instances within a preset time range prior to the moment when the performance bottleneck is discovered, with the moment of discovery as the endpoint. For example, if the moment when the performance bottleneck is discovered is 70 and the preset time range is 60, then metric data within the time period from 10 to 70 is acquired.
[0132] When a performance bottleneck occurs, the system acquires the service's metrics data and the metrics data of all instances under the service. Correlation analysis of the metrics data provides a data foundation for subsequent optimization of the performance bottleneck.
[0133] Step 406: Perform correlation analysis based on the indicator data to determine the first correlation coefficient between each instance and the service.
[0134] In some embodiments, the method for calculating the first correlation coefficient between each instance and the service includes, but is not limited to, obtaining it using the Spearman correlation coefficient calculation formula or the Pearson correlation coefficient calculation formula.
[0135] By performing correlation analysis on one or more metrics data of the service and each instance under the service in the period before the bottleneck occurs, the degree of correlation between the metric data of each instance and the service can be obtained, which provides a basis for subsequent weight optimization and helps to improve the optimization effect.
[0136] Step 407: Determine the corresponding weight optimization strategy based on the location of the performance bottleneck.
[0137] Here, the location of the performance bottleneck accurately identifies the specific service or instance experiencing the performance problem. By implementing different weighted optimization strategies for performance bottlenecks occurring in different locations, targeted optimization of these bottlenecks can be achieved.
[0138] In some embodiments, a corresponding weight optimization strategy is determined based on the location of the performance bottleneck, including:
[0139] If the performance bottleneck is located on the service, the weight optimization strategy is determined by: calculating the difference between the first constant and the first correlation coefficient between each instance and the service to obtain the optimization weight value corresponding to each instance;
[0140] If the performance bottleneck is located only on an instance, determining the weight optimization strategy includes: calculating the product of the original weight value of each instance and the first correlation coefficient between each instance and the service to obtain the optimized weight value corresponding to each instance; wherein, the original weight value is the weight value corresponding to each instance before the performance bottleneck is discovered.
[0141] In some embodiments, the weight optimization strategy further includes: when the first correlation coefficient is greater than or equal to 1 or is abnormal, setting the first correlation coefficient to 0.99; when the first correlation coefficient is less than or equal to 0, setting the first correlation coefficient to 0.01.
[0142] For example, if the performance bottleneck is located on the service, the weight optimization strategy is determined as follows: the optimization weight value corresponding to instance A is determined to be Wa = 1 - RA, the optimization weight value corresponding to instance B is Wb = 1 - RB, and the optimization weight value corresponding to instance C is Wc = 1 - RC. The ratio of the optimization weight values of each instance is: W = (1 - RA):(1 - RB):(1 - RC); where RA, RB, and RC are the first correlation coefficients between instance A, instance B, and instance C and service 1, respectively.
[0143] The performance bottleneck is located only at the instance level. The weight optimization strategy is determined as follows: the optimization weight value for instance A is Wa = Wa' × RA, the optimization weight value for instance B is Wb = Wb' × RB, and the optimization weight value for instance C is Wc = Wc' × RC. The ratio of the optimization weight values for each instance is: W = (Wa' × RA):(Wb' × RB):(Wc' × RC); where RA, RB, and RC are the first correlation coefficients between instance A, instance B, and instance C and service 1, respectively. Wa', Wb', and Wc' are the weight values of instance A, instance B, and instance C before the performance bottleneck was discovered, respectively.
[0144] The aforementioned weight optimization strategy also includes: when the first correlation coefficient is greater than or equal to 1 or is abnormal, setting the first correlation coefficient to 0.99; when the first correlation coefficient is less than or equal to 0, setting the first correlation coefficient to 0.01.
[0145] By applying different weighting optimization strategies to performance bottlenecks occurring on the service and those occurring on the instance, performance bottlenecks can be optimized in a targeted manner, thereby improving the accuracy of bottleneck optimization.
[0146] Step 408: Determine at least two optimized weight values corresponding to the at least two instances based on the weight optimization strategy and the first correlation coefficient.
[0147] Step 409: Determine the load weight allocation optimization strategy based on the at least two optimized weight values.
[0148] The optimization weight value corresponding to each instance is used to distribute the load to each instance when performing bottleneck optimization.
[0149] Step 410: Execute the load weight allocation optimization strategy to configure load balancing.
[0150] The technical solution of this application, by performing anomaly detection on abnormal services or instances over a cumulative period, can filter out occasionally occurring abnormal services or instances and identify those that truly reach performance bottlenecks, thus achieving automatic identification of performance bottlenecks in the system. By applying different weight optimization strategies to performance bottlenecks occurring on services and those occurring on instances, the targeting of performance bottleneck optimization can be improved. By performing correlation analysis on the historical indicator data of the service and each instance under the service in the period before the bottleneck occurs, a basis can be provided for subsequent weight optimization, improving the effectiveness of weight optimization and enhancing the effectiveness of bottleneck optimization, thereby achieving effective optimization of performance bottlenecks and ultimately optimizing the performance of the business system.
[0151] Here, the entity performing all the above steps can be the processor of an electronic device.
[0152] To better illustrate the purpose of this application, further examples are provided based on the above embodiments. Figure 7 This is a schematic diagram of the fourth process of the performance optimization method for the business system in this application embodiment, as shown below. Figure 7 As shown, the specific methods for performance optimization of business systems include:
[0153] Step 701: Obtain the raw metric data of the service in the system and all instances under the service, and preprocess the obtained raw metric data.
[0154] Specifically, preprocessing includes handling missing values and noise in the original indicator data.
[0155] Imputing missing values in raw data involves discarding rows or columns containing missing values, such as spaces, NaNs, or other placeholders. A basic strategy for handling incomplete datasets is to discard data containing missing values. However, this comes at the cost of discarding potentially valuable data (even if incomplete). A better strategy is to infer the missing values from the existing data or fill them with the result of a calculation of the same metric (mean, median, mode, etc.). In data noise handling, noise is the random error or variance of the measured variable. We can use basic statistical descriptive techniques (e.g., box plots or scatter plots) and data visualization methods to identify outliers that may represent noise, thus achieving data noise handling.
[0156] For example, Figure 8 A flowchart illustrating the preprocessing of raw indicator data is presented. Specifically, the process is implemented through the following steps: Step 801: Obtain raw indicator data; specifically, obtain the raw indicator data of the service in the system and all instances under the service; Step 802: Handle missing values in the obtained raw indicator data; Step 803: Perform noise processing on the data after handling missing values to obtain preprocessed indicator data.
[0157] Step 702: Construct an indicator prediction model based on the random forest algorithm and train the model to obtain the indicator prediction model.
[0158] Specifically, the Random Forest Regressor algorithm in the Spark-ML machine learning framework is selected to construct the indicator prediction model; appropriate and reasonable model hyperparameters are set; the indicator prediction model is trained using grid search and cross-validation; it is determined whether the prediction results of the indicator prediction model meet the model evaluation conditions. If not, the parameters of the indicator prediction model are optimized and the process returns to the execution step; if the prediction results of the indicator prediction model meet the model evaluation conditions, the training of the indicator prediction model is considered complete. The model evaluation conditions can be set to R... 2 Greater than 0.8.
[0159] Step 703: Perform anomaly detection on the indicator data based on the 3-Sigma model.
[0160] Specifically, a 3-Sigma model conforming to a normal distribution is trained using the historical residuals between the predicted and actual indicator data from the prediction model. The residuals between the actual and predicted indicator data from the new real-time indicator data are then fed into the model. The model is then checked to determine if the residuals are outside the 3σ threshold. If the residuals are outside the 3σ threshold, the residuals are considered to exceed the threshold, and the actual indicator data is deemed abnormal. If the residuals are within the 3σ threshold, the residuals are considered to be within the threshold, and the actual indicator data is deemed to be normal. The sensitivity for identifying abnormal data can be adjusted by changing the factor of σ.
[0161] The 3-sigma algorithm is used to train a model that conforms to a normal distribution by training the residual between the predicted and actual values of the prediction model. Anomaly detection of new real-time data is performed by simultaneously calculating the prediction model and the 3-sigma model, which can improve the universality of the anomaly detection model. It has high universality for anomaly detection of different data models and can improve the efficiency of anomaly detection.
[0162] Step 704: Perform cumulative anomaly detection on services or instances that are experiencing abnormalities.
[0163] Specifically, based on the above-mentioned real-time anomaly detection results for the overall service and all instances' metrics data, if anomalies are found in the throughput and response time of the service or instance's metrics data, then the anomaly detection will be performed on the object where the anomaly occurred for a cumulative period of 5 minutes from the current moment.
[0164] Step 705: Identify performance bottlenecks based on the cumulative anomaly detection results and determine the location of the performance bottlenecks.
[0165] Specifically, if anomalies continue to occur (with an anomaly probability exceeding 60%), the current system's performance is determined to have reached a performance bottleneck, triggering the performance optimization engine to execute optimization strategies. If the object continuously experiencing anomalies is a service, then a performance bottleneck is identified, and the bottleneck location is determined to be the service. If the object continuously experiencing anomalies is only an instance, then a performance bottleneck is identified, and the bottleneck location is determined to be the instance.
[0166] For example, Figure 9 This document illustrates a flowchart for bottleneck identification of Service 1 and its instances. The process consists of the following steps: Step 901: Obtain metric data for Service 1 and all instances of that service; Step 902: Perform anomaly detection on the obtained metric data; Step 903: Perform cumulative anomaly detection on services or instances exhibiting anomalies; Step 904: Identify performance bottlenecks based on the cumulative anomaly detection results and determine the location of the performance bottleneck.
[0167] Step 706: Perform correlation analysis using Spearman correlation coefficient to determine the first correlation coefficient between each instance and the service.
[0168] Specifically, when a service or instance experiences a performance bottleneck, the system retrieves metric data for the service and all instances over a one-hour period, starting from the moment the bottleneck is discovered. A second correlation coefficient is calculated between each instance and the service using different metric data (response time, throughput, etc.). The final first correlation coefficient is the average of the second correlation coefficients calculated using these different metrics. The second correlation coefficient between each instance and the service is calculated based on Spearman's formula.
[0169] Spearman correlation is not sensitive to data errors and extreme values, and it can more accurately reflect the correlation than Pearson correlation coefficient for noisy time series data.
[0170] Step 707: Determine the corresponding load weight allocation optimization strategy based on the location of the performance bottleneck and the first correlation coefficient.
[0171] Specifically, if the performance bottleneck occurs in a service, the load weight allocation optimization strategy is determined as follows: the optimization weight value corresponding to instance A is determined to be Wa = 1 - RA, the optimization weight value corresponding to instance B is Wb = 1 - RB, and the optimization weight value corresponding to instance C is Wc = 1 - RC. The ratio of the optimization weight values of each instance is: W = (1 - RA):(1 - RB):(1 - RC); where RA, RB, and RC are the first correlation coefficients between instance A, instance B, and instance C and service 1, respectively.
[0172] The performance bottleneck occurs only at the instance level. The load weight allocation optimization strategy is determined as follows: the optimization weight value for instance A is Wa = Wa' × RA, the optimization weight value for instance B is Wb = Wb' × RB, and the optimization weight value for instance C is Wc = Wc' × RC. The ratio of the optimization weight values for each instance is: W = (Wa' × RA):(Wb' × RB):(Wc' × RC); where RA, RB, and RC are the first correlation coefficients between instance A, instance B, and instance C and service 1, respectively. Wa', Wb', and Wc' are the weight values of instance A, instance B, and instance C before the performance bottleneck was discovered, respectively.
[0173] Specifically, when the first correlation coefficient is greater than or equal to 1 or is abnormal, the first correlation coefficient is set to 0.99; when the first correlation coefficient is less than or equal to 0, the first correlation coefficient is set to 0.01.
[0174] Step 708: Execute the load weight allocation optimization strategy.
[0175] Specifically, load balancing is configured based on the optimized weight ratio. This configuration can be done manually or automatically via a script, requiring a restart of the load balancer for the changes to take effect.
[0176] For example, Figure 10 This document illustrates a flowchart for optimizing the performance of services or instances that have identified performance bottlenecks. The specific methods described in the above embodiments are used to identify and optimize performance bottlenecks in services and their instances A, B, and C.
[0177] Here, the entity performing all the above steps can be the processor of an electronic device.
[0178] The technical solution of this application uses the residual values between historical predicted values and actual historical values of a random forest regression model as the calculation basis of a 3-Sigma model. By using the 3-Sigma model to set a constant detection threshold from a probabilistic perspective, it ultimately satisfies the dynamic threshold of the data to detect anomalies, forming an anomaly detection model. This improves the universality of the anomaly detection model, demonstrating high applicability to anomaly detection across different data models and increasing anomaly detection efficiency. By performing cumulative anomaly detection on abnormal services or instances, it can filter out occasionally occurring abnormal services or instances, identifying those that truly reach performance bottlenecks, thus achieving automatic identification of performance bottlenecks in the system. By applying different weight optimization strategies to performance bottlenecks occurring on services and instances, it can improve the targeting of performance bottleneck optimization. Furthermore, by performing correlation analysis on the historical indicator data of the service and each instance under the service in the period before the bottleneck occurs, it can provide a basis for subsequent weight optimization, improving the effectiveness of weight optimization and enhancing the effectiveness of bottleneck optimization. This achieves effective optimization of performance bottlenecks, thereby optimizing the performance of the business system.
[0179] For example, Figure 11 This paper presents a process model for performance bottleneck identification and optimization. Figure 11 In this system, Service 1 includes three instances: Instance A, Instance B, and Instance C. An AI algorithm is used to acquire current load information and performance metrics data for the service and each instance, and to identify performance bottlenecks and perform correlation analysis on the metrics data. A load optimization model is used to determine optimization weight values based on a weight optimization strategy and the first correlation coefficient between the instance and the service. A load balancer is used to configure load balancing for Instance A, Instance B, and Instance C according to the weight parameters (weight values). For example, the load weight ratio of Instance A, Instance B, and Instance C to the total load of the service is currently 1:1:1. The AI algorithm detects that Instance C reaches the performance bottleneck first, and the load optimization model determines an optimization weight parameter of 2:2:1 (optimization weight value). The load balancer receives the optimization weight parameter and configures load balancing accordingly. This achieves automatic identification and optimization of performance bottlenecks.
[0180] Figure 12 This paper demonstrates a method for system performance tuning that applies performance bottleneck optimization to system performance tuning. The method specifically includes: Step 121: Assess the current state of the system; Step 122: Set tuning goals; Step 123: Identify performance bottlenecks; Step 124: Optimize performance bottlenecks; Step 125: Determine whether the tuning goals have been achieved. If the goals have been achieved, proceed to Step 126; otherwise, return to Step 123; Step 126: Confirm that performance tuning is complete.
[0181] To implement the method of the embodiments of this application, based on the same inventive concept, the embodiments of this application also provide an optimization device for performance bottlenecks, such as... Figure 13 As shown, the device includes:
[0182] Monitoring module 131 is used to monitor whether there are any anomalies in the business system;
[0183] The processing module 132 is used to determine the performance bottleneck of the business system if an anomaly is found, wherein the performance bottleneck is specifically a key node that affects the performance optimization of the business system.
[0184] The processing module 132 is also used to perform correlation analysis on the performance bottleneck and determine the load weight allocation optimization strategy;
[0185] The processing module 132 is also used to execute the load weight allocation optimization strategy for load balancing configuration.
[0186] In some embodiments, performing correlation analysis on the performance bottleneck to determine a load weight allocation optimization strategy includes:
[0187] Based on the time when the performance bottleneck occurs, obtain the service's metric data within a preset time range and the metric data of at least two instances under the service;
[0188] Based on the aforementioned indicator data, a correlation analysis is performed to determine the first correlation coefficient between each instance and the service;
[0189] Based on the location of the performance bottleneck, determine the corresponding weight optimization strategy;
[0190] Based on the weight optimization strategy and the first correlation coefficient, at least two optimized weight values are determined for the at least two instances.
[0191] The load weight allocation optimization strategy is determined based on the at least two optimized weight values.
[0192] In some embodiments, determining the corresponding weight optimization strategy based on the location of the performance bottleneck includes:
[0193] If the performance bottleneck is located on the service, the weight optimization strategy is determined by: calculating the difference between the first constant and the first correlation coefficient between each instance and the service to obtain the optimization weight value corresponding to each instance;
[0194] If the performance bottleneck is located only on an instance, determining the weight optimization strategy includes: calculating the product of the original weight value of each instance and the first correlation coefficient between each instance and the service to obtain the optimized weight value corresponding to each instance; wherein, the original weight value is the weight value corresponding to each instance before the performance bottleneck is discovered.
[0195] In some embodiments, the weight optimization strategy further includes: when the first correlation coefficient is greater than or equal to 1 or is abnormal, setting the first correlation coefficient to 0.99;
[0196] When the first correlation coefficient is less than or equal to 0, the first correlation coefficient is set to 0.01.
[0197] In some embodiments, the indicator data includes at least one indicator data;
[0198] The step of performing correlation analysis based on the indicator data to determine the first correlation coefficient between each instance and the service includes:
[0199] Perform correlation calculations on at least one indicator data to obtain at least one second correlation coefficient between each instance and the service;
[0200] When the indicator data includes one type of indicator data, the second correlation coefficient is used as the first correlation coefficient;
[0201] When the indicator data includes at least two types of indicator data, the average of at least two second correlation coefficients between each instance and the service is taken to obtain the first correlation coefficient between each instance and the service.
[0202] In some embodiments, the metric data includes response time and / or throughput.
[0203] In some embodiments, monitoring whether the business system has anomalies includes:
[0204] The performance metrics of the first service or the first instance in the business system are predicted using the metric prediction model to obtain the predicted metric data.
[0205] Calculate the residual between the actual indicator data and the predicted indicator data of the first service or the first instance;
[0206] If the residual between the actual indicator data and the predicted indicator data of the first service exceeds the residual threshold, the first service is determined to be abnormal.
[0207] If the residual between the actual indicator data and the predicted indicator data of the first instance exceeds the residual threshold, the first instance is determined to be abnormal.
[0208] In some embodiments, determining the performance bottleneck of the business system if it exists includes:
[0209] When the first service or the first instance is abnormal, the cumulative abnormal value of the first service or the first instance within a preset time period is recorded; wherein, the first service and the first instance can be any service and any instance in the business system;
[0210] If the cumulative abnormal value of the first service is greater than or equal to the first abnormal threshold, a performance bottleneck is determined to have occurred and the location of the performance bottleneck is the first service.
[0211] If the cumulative abnormal value of the first instance is greater than or equal to the second abnormal threshold, a performance bottleneck is determined to have occurred, and the location of the performance bottleneck is the first instance.
[0212] In some embodiments, the method for monitoring whether the business system has an anomaly further includes: the method further includes:
[0213] A predictive model for indicators was constructed using the random forest regression algorithm.
[0214] The indicator prediction model is trained using grid search and cross-validation.
[0215] When the prediction result of the indicator prediction model does not meet the model evaluation conditions, the parameters of the indicator prediction model are optimized.
[0216] When the prediction results of the indicator prediction model meet the model evaluation conditions, the training of the indicator prediction model is considered complete.
[0217] Based on the hardware implementation of each unit in the above business system optimization, this application embodiment also provides another electronic device, such as... Figure 14 As shown, the electronic device includes: a processor 141 and a memory 142 configured to store a computer program capable of running on the processor; wherein, when the processor 141 runs the computer program, it executes the method steps in the foregoing embodiments.
[0218] Of course, in practical applications, such as Figure 14 As shown, each component in this electronic device is coupled together via a bus system 143. It is understood that the bus system 143 is used to enable communication between these components. In addition to a data bus, the bus system 143 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 14 The general designated all buses as Bus System 143.
[0219] In practical applications, the aforementioned processor can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field-Programmable Gate Array (FPGA), controller, microcontroller, and microprocessor. It is understood that, for different devices, the electronic devices used to implement the functions of the aforementioned processor can also be other types, and the embodiments of this application do not specifically limit this.
[0220] The aforementioned memory can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of memory, and provides instructions and data to the processor.
[0221] In an exemplary embodiment, this application also provides a computer-readable storage medium, such as a memory including a computer program, which can be executed by a processor of an electronic device to perform the steps of the aforementioned method.
[0222] It should be understood that the terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items. The expressions “having,” “may have,” “comprising,” and “including,” or “may include” and “may contain” used herein may be used to indicate the presence of a corresponding feature (e.g., an element such as a number, function, operation, or component), but do not exclude the presence of additional features.
[0223] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another, and are not necessarily used to describe a specific order or sequence. For example, without departing from the scope of this invention, first information may also be referred to as second information, and similarly, second information may also be referred to as first information.
[0224] The technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.
[0225] In the several embodiments provided in this application, it should be understood that the disclosed methods, apparatus, and devices can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical, or other forms.
[0226] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0227] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0228] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A performance optimization method for a business system, characterized in that, The method includes: Monitor the business systems for any anomalies; If the first service or the first instance is abnormal, the cumulative abnormal value of the first service or the first instance within a preset time period is recorded; wherein, the first service and the first instance can be any service and any instance in the business system; If the cumulative anomaly value of the first service is greater than or equal to the first anomaly threshold, a performance bottleneck is determined to have occurred in the first service; if the cumulative anomaly value of the first instance is greater than or equal to the second anomaly threshold, a performance bottleneck is determined to have occurred in the first instance; wherein, the performance bottleneck is specifically a key node affecting the performance optimization of the business system. Based on the time when the performance bottleneck occurs, obtain the service's metric data within a preset time range and the metric data of at least two instances under the service; Based on the aforementioned indicator data, a correlation analysis is performed to determine the first correlation coefficient between each instance and the service; If the performance bottleneck is located on the service, the weight optimization strategy is determined by: calculating the difference between the first constant and the first correlation coefficient between each instance and the service to obtain the optimization weight value corresponding to each instance; If the performance bottleneck is located only on the instance, the weight optimization strategy is determined by: calculating the product of the original weight value of each instance and the first correlation coefficient between each instance and the service to obtain the optimized weight value corresponding to each instance; wherein, the original weight value is the weight value corresponding to each instance before the performance bottleneck is discovered; Based on the weight optimization strategy and the first correlation coefficient, at least two optimized weight values are determined for the at least two instances. Based on the at least two optimized weight values, determine the load weight allocation optimization strategy; The load weight allocation optimization strategy is executed to configure load balancing.
2. The method according to claim 1, characterized in that, The weight optimization strategy further includes: when the first correlation coefficient is greater than or equal to 1 or is abnormal, setting the first correlation coefficient to 0.99; When the first correlation coefficient is less than or equal to 0, the first correlation coefficient is set to 0.
01.
3. The method according to claim 1, characterized in that, The indicator data includes at least one indicator data; The step of performing correlation analysis based on the indicator data to determine the first correlation coefficient between each instance and the service includes: Perform correlation calculations on at least one indicator data to obtain at least one second correlation coefficient between each instance and the service; When the indicator data includes one type of indicator data, the second correlation coefficient is used as the first correlation coefficient; When the indicator data includes at least two types of indicator data, the average of at least two second correlation coefficients between each instance and the service is taken to obtain the first correlation coefficient between each instance and the service.
4. The method according to claim 1, characterized in that, The metrics data include response time and / or throughput.
5. The method according to claim 1, characterized in that, The method further includes: The performance metrics of the first service or the first instance in the business system are predicted using a metric prediction model to obtain predicted metric data. Calculate the residual between the actual indicator data and the predicted indicator data of the first service or the first instance; If the residual between the actual indicator data and the predicted indicator data of the first service exceeds the residual threshold, the first service is determined to be abnormal. If the residual between the actual indicator data and the predicted indicator data of the first instance exceeds the residual threshold, the first instance is determined to be abnormal.
6. The method according to claim 5, characterized in that, The method further includes: A predictive model for indicators was constructed using the random forest regression algorithm. The indicator prediction model is trained using grid search and cross-validation. When the prediction result of the indicator prediction model does not meet the model evaluation conditions, the parameters of the indicator prediction model are optimized. When the prediction results of the indicator prediction model meet the model evaluation conditions, the training of the indicator prediction model is considered complete.
7. A device for optimizing the performance of a business system, characterized in that, The device includes: The monitoring module is used to monitor whether there are any anomalies in the business system; The processing module is configured to record the cumulative abnormal value of the first service or the first instance within a preset time period when the first service or the first instance is abnormal; wherein the first service and the first instance are any service and any instance in the business system; if the cumulative abnormal value of the first service is greater than or equal to a first abnormal threshold, it is determined that a performance bottleneck has occurred and the location of the performance bottleneck is the first service; if the cumulative abnormal value of the first instance is greater than or equal to a second abnormal threshold, it is determined that a performance bottleneck has occurred and the location of the performance bottleneck is the first instance, wherein the performance bottleneck is specifically a key node affecting the performance optimization of the business system; The processing module is further configured to: acquire indicator data of the service within a preset time range and indicator data of at least two instances under the service based on the occurrence time of the performance bottleneck; perform correlation analysis based on the indicator data to determine a first correlation coefficient between each instance and the service; if the performance bottleneck is located on the service, determine the weight optimization strategy by: calculating the difference between a first constant and the first correlation coefficient between each instance and the service to obtain an optimized weight value corresponding to each instance; if the performance bottleneck is located only on the instance, determine the weight optimization strategy by: calculating the product of the original weight value of each instance and the first correlation coefficient between each instance and the service to obtain an optimized weight value corresponding to each instance; wherein, the original weight value is the weight value corresponding to each instance before the performance bottleneck is discovered; determine at least two optimized weight values corresponding to the at least two instances based on the weight optimization strategy and the first correlation coefficient; and determine a load weight allocation optimization strategy based on the at least two optimized weight values. The processing module is also used to execute the load weight allocation optimization strategy to perform load balancing configuration.
8. An electronic device, characterized in that, The electronic device includes: a processor and a memory configured to store computer programs capable of running on the processor. Wherein, when the processor is configured to run the computer program, it performs the steps of the method according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method described in any one of claims 1-6.
Citation Information
Patent Citations
Two-stage service system load forecast and balancing method integrating service forecast and real-time load
CN102664812A
Load balancing method and device, computer equipment and storage medium
CN110134513A