Performance prediction method and device based on ridge regression model and electronic equipment
By constructing a performance prediction method using a ridge regression model, and combining regularization and scenario partitioning, the problem of insufficient throughput prediction accuracy in fintech distributed business systems is solved, achieving more accurate performance prediction and automated optimization, and improving system stability and throughput prediction accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2025-08-12
- Publication Date
- 2026-07-31
AI Technical Summary
In distributed business systems within the fintech industry, existing technologies struggle to effectively predict performance risks, especially in high-concurrency and resource-intensive flash sale scenarios where throughput prediction accuracy is insufficient, impacting system stability and security.
The ridge regression model is used as the basic framework. Regularization constraints are introduced to prevent the model from overfitting. Sample data are divided according to scenario type. Performance prediction models are built for general and flash sale scenarios respectively. Basic performance indicators and stress feature data are introduced to improve the accuracy of throughput prediction.
It improves the accuracy of throughput prediction in different scenarios, especially in the case of flash sales, it can more accurately quantify the impact of system bottlenecks on performance, support automated performance optimization decisions, and improve system stability and reliability.
Smart Images

Figure CN122496442A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more particularly to the field of financial technology, specifically to a performance prediction method, apparatus, and electronic device based on a ridge regression model. Background Technology
[0002] As fintech moves towards a new era of distributed architecture, the complexity of transaction paths has significantly increased, and the intricacy of business logic has reached a new level. This shift presents more severe challenges to critical tasks such as performance capacity prediction and environment maintenance. With frequent changes in business transactions, and even some transactions experiencing tsunami-like surges in traffic, the stability of distributed business systems in the fintech field is facing unprecedented challenges, and performance risks are gradually becoming an issue that cannot be ignored. Therefore, to ensure the robustness and security of the fintech infrastructure architecture, it is necessary to strengthen research on performance early warning mechanisms to maintain the stable operation of the industry.
[0003] Therefore, conducting performance research on distributed business systems in the fintech industry is of great significance. Summary of the Invention
[0004] This application provides a performance prediction method, apparatus, and electronic device based on a ridge regression model to improve the accuracy of throughput prediction.
[0005] In a first aspect, embodiments of this application provide a performance prediction method based on a ridge regression model, including:
[0006] Obtain the sample scenario type to which the sample data belongs in the distributed business system;
[0007] If the sample scenario type is a general scenario, then based on the ridge regression model, the first feature data of the sample data and the actual throughput of the sample data are used to construct a performance prediction model for the general scenario.
[0008] If the sample scenario type is a flash sale scenario, then based on the ridge regression model, the first feature data, the second feature data, and the actual throughput of the sample data are used to construct a performance prediction model for the flash sale scenario.
[0009] The second feature data is used to quantify the pressure characteristics of the distributed business system under the flash sale scenario and identify the key performance indicators of system bottlenecks; wherein, the first feature data includes at least one of the following: concurrency, CPU utilization, memory usage or network I / O.
[0010] Secondly, embodiments of this application also provide a performance prediction device based on a ridge regression model, comprising:
[0011] The sample scenario module is used to obtain the sample scenario type to which the sample data in the distributed business system belongs;
[0012] A general model module is used to construct a performance prediction model for a general scenario based on a ridge regression model, using the first feature data of the sample data and the actual throughput of the sample data, if the sample scenario type is a general scenario.
[0013] The flash sale model module is used to construct a performance prediction model for a flash sale scenario based on a ridge regression model, using the first feature data, the second feature data, and the actual throughput of the sample data if the sample scenario type is a flash sale scenario. The second feature data is used to characterize the pressure characteristics and key performance data of the bottleneck of distributed services under the flash sale scenario.
[0014] The first feature data includes at least one of the following: concurrency, CPU utilization, memory usage, and network I / O.
[0015] Thirdly, embodiments of this application also provide an electronic device, which includes:
[0016] One or more processors;
[0017] Storage device for storing one or more programs;
[0018] When one or more programs are executed by one or more processors, the one or more processors implement any of the performance prediction methods based on the ridge regression model provided in the embodiments of this application.
[0019] Fourthly, embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements any of the performance prediction methods based on the ridge regression model provided in embodiments of this application.
[0020] This application employs the Ridge Regression algorithm as its basic framework, introducing regularization constraints to prevent model overfitting. Based on scenario type labels, the sample data is divided into a general dataset and a flash sale dataset. For the general scenario, basic performance indicators such as concurrency, CPU utilization, memory usage, or network I / O are used as the first feature data input to the model. For the flash sale scenario, in addition to the first feature data, a second feature data is introduced to quantify the pressure characteristics of the distributed business system and identify resource bottlenecks. By constructing performance prediction models for the general scenario and the flash sale scenario respectively, the characteristics of different business loads can be captured, improving the throughput prediction accuracy under different scenarios. Especially in the resource-contested flash sale scenario, the introduction of pressure feature indicators allows the model to more accurately quantify the impact of system bottlenecks on performance.
[0021] Therefore, the technical solution of this application solves the problem and achieves the desired effect. Attached Figure Description
[0022] Figure 1 This is a flowchart of a performance prediction method based on a ridge regression model provided in Embodiment 1 of this application;
[0023] Figure 2 This is a flowchart of another performance prediction method based on the ridge regression model provided in Embodiment 2 of this application;
[0024] Figure 3 This is a schematic diagram of a performance prediction device based on a ridge regression model provided in Embodiment 3 of this application;
[0025] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the performance prediction method based on the ridge regression model according to the embodiments of this application. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first" and "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] Example 1
[0029] Figure 1This is a flowchart of a performance prediction method based on a ridge regression model according to Embodiment 1 of this application. This embodiment is applicable to performance studies of distributed business systems in the fintech industry and can be executed by a performance prediction device based on a ridge regression model. This performance prediction device can be implemented in hardware and / or software and can be configured in a computer device. Figure 1 As shown, the method includes:
[0030] S101. Obtain the sample scenario type to which the sample data in the distributed business system belongs; if the sample scenario type is a general scenario, continue to execute S102; if the sample scenario type is a flash sale scenario, jump to execute S103.
[0031] S102. Based on the ridge regression model, a performance prediction model for general scenarios is constructed using the first feature data of the sample data and the actual throughput of the sample data.
[0032] S103. Based on the ridge regression model, a performance prediction model for the flash sale scenario is constructed using the first feature data, the second feature data, and the actual throughput of the sample data.
[0033] The second feature data is used to quantify the pressure characteristics of the distributed business system under the flash sale scenario and identify the key performance indicators of system bottlenecks; wherein, the first feature data includes at least one of the following: concurrency, CPU utilization, memory usage or network I / O.
[0034] The first feature data is a basic performance indicator for general scenarios, which may include at least one of the following: concurrency, CPU utilization, memory usage, or network I / O; the second feature data is a supplementary performance indicator designed for high-concurrency, resource-competitive flash sale scenarios, used to quantify the instantaneous pressure characteristics of the system and identify key data for potential performance bottlenecks, together with the basic performance indicators to form a scenario-based performance evaluation system.
[0035] A load generation tool is used to simulate different concurrent requests (e.g., from 50 to 1000 concurrent requests, increasing in increments of 50). Performance monitoring tools are deployed on various components of the distributed business system to collect system operation data in real time. For general scenarios, basic performance indicators such as concurrency, CPU usage, memory usage (GB), and network I / O (MB / s) are collected to form the first feature set of the sample data. For flash sale scenarios with instantaneous ultra-high concurrency, intense resource contention, and extreme sensitivity to response latency, additional features are collected, identified, or calculated on top of the basic performance indicators to quantify the pressure characteristics of the distributed business system under flash sale scenarios and identify key performance indicators that identify system bottlenecks, forming the second feature set of the sample data. Each sample data has a scenario type label of "general" or "flash sale," providing scenario-based data for subsequent data processing, model training, and throughput prediction. Moreover, the throughput (TPS / s) corresponding to the sample data is collected through the performance monitoring tool to obtain the true throughput labeled in the sample data. To improve the quality of the first feature set, data cleaning can be performed on the first feature set, for example, removing invalid data caused by monitoring latency (such as CPU usage = 0, but throughput > 0).
[0036] Because there is a certain correlation among the selected feature variables, this embodiment uses the ridge regression algorithm to construct a performance prediction model. Modeling is achieved by minimizing the sum of squared residuals and the L2 regularization term in the ridge regression algorithm. Due to the limited sample size, the L2 regularization term is introduced to prevent overfitting. Based on scene type labels, the sample data is divided into a general dataset and a flash sale dataset. All sample data in the general dataset are of the general scene type, including the first feature data and the actual throughput. All sample data in the flash sale dataset are of the flash sale scene type, including the first feature data, the second feature data, and the actual throughput. The general dataset can be divided into a general training set and a general test set; the flash sale dataset can be divided into a flash sale training set and a flash sale validation set. For the general scene, the first feature data of the sample data in the general dataset is input into the ridge regression model to generate the predicted throughput. A loss function is constructed based on the difference between the predicted throughput and the actual throughput. The model parameters are then tuned using the loss function to obtain the performance prediction model for the general scene. For the flash sale scenario, the first and second feature data of the sample data in the flash sale dataset are input into the ridge regression model to generate the predicted throughput. A loss function is constructed based on the difference between the predicted throughput and the actual throughput, and the model parameters are tuned using the loss function to obtain the performance prediction model for the flash sale scenario.
[0037] In constructing a high-performance prediction model, this application uses the Ridge Regression algorithm as the basic framework. Regularization constraints are introduced to prevent overfitting, balancing model complexity and generalization ability even with limited sample size. Sample data is divided into a general dataset and a flash sale dataset based on scenario type labels. For the general scenario, basic performance metrics such as concurrency, CPU utilization, memory usage, or network I / O are used as the first feature data input to the model. For the flash sale scenario, in addition to the first feature data, a second feature data is introduced to quantify the pressure characteristics of the distributed business system and identify resource bottlenecks. By constructing performance prediction models for the general scenario and the flash sale scenario respectively, the characteristics of different business loads can be captured, improving the throughput prediction accuracy in different scenarios. Especially in the resource-contested flash sale scenario, the introduction of pressure feature metrics allows the model to more accurately quantify the impact of system bottlenecks on performance.
[0038] The technical solution in this embodiment uses the Ridge Regression algorithm as its basic framework and introduces regularization constraints to prevent model overfitting. The sample data is divided into a general dataset and a flash sale dataset based on scenario type labels. For the general scenario, basic performance indicators such as concurrency, CPU utilization, memory usage, or network I / O are used as the first feature data input to the model. For the flash sale scenario, in addition to the first feature data, a second feature data is introduced to quantify the pressure characteristics of the distributed business system and identify resource bottlenecks. By constructing performance prediction models for the general scenario and the flash sale scenario respectively, the characteristics of different business loads can be captured, improving the throughput prediction accuracy in different scenarios. Especially in the resource-contested flash sale scenario, the introduction of pressure feature indicators allows the model to more accurately quantify the impact of system bottlenecks on performance.
[0039] In one optional implementation, the step of constructing a performance prediction model for a general scenario based on a ridge regression model, using first feature data of the sample data and the actual throughput of the sample data, includes: multiplying the concurrency and the CPU utilization to obtain a first interaction feature; multiplying the CPU utilization and the network I / O to obtain a second interaction feature; multiplying the concurrency by itself to obtain a third interaction feature; inputting the first feature data, the first interaction feature, the second interaction feature, and the third interaction feature of the sample data into a standard ridge regression model to obtain the predicted throughput output by the standard ridge regression model; and training the standard ridge regression model using the predicted throughput and the actual throughput of the sample data to obtain a performance prediction model for a general scenario.
[0040] Beyond basic performance metrics, interactive features and multinomial features are introduced to enhance model reliability. Interactive features are generated by combining two or more original features (e.g., through multiplication) to capture dynamic dependencies between features. For example, increased concurrency non-linearly amplifies the impact of CPU resource consumption on throughput; therefore, multiplying concurrency and CPU utilization yields the first interactive feature, which quantifies the balance between concurrency pressure and computing resources. Conversely, multiplying CPU utilization and network I / O yields the second interactive feature, used to quantify the collaborative consumption relationship between computing and network resources. When a distributed business system simultaneously faces high CPU load (e.g., complex computational tasks) and high network I / O load (e.g., large data transfers), the second interactive feature reflects the cumulative effect of resource competition; this combined pressure often triggers system bottlenecks earlier than single resource saturation. Multinomial features are generated by performing non-linear transformations such as squaring and cube on the original features to model non-linear relationships. For example, when the concurrency is low, the throughput increases linearly with the concurrency; however, after the concurrency exceeds the system bottleneck, the throughput growth slows down or even decreases (exhibiting a parabolic trend). Therefore, the concurrency is multiplied by itself, and a polynomial characteristic concurrency of 2 is used to describe the nonlinear load effect.
[0041] For general scenarios, model input features can include basic features such as concurrency, CPU usage, memory usage, and network I / O, as well as interactive / polynomial features such as concurrency × CPU usage, CPU usage × network I / O, and concurrency 2. Before inputting the data into the model, all features can be Z-score standardized (mean 0, standard deviation 1) to eliminate the differences in units between different feature values.
[0042] Referring to the following formula, the loss function for the standard ridge regression model in general scenarios is:
[0043]
[0044] Among them, y i X is the i-th observation of the target variable, i.e., the i-th actual throughput. i =(x i1 ,x i2 ,…,x ip ) represents the i-th observation of the independent variable, with a total of p input features; λ is the hyperparameter regularization strength, which can be obtained through cross-validation network search. By incorporating interaction features and multinomial features, the dynamic dependencies between features can be effectively captured, overcoming the expressive limitations of linear models and thus better reflecting the curve trends of real data.
[0045] For example, the general scenario uses a first regularization strength; the flash sale scenario uses a second regularization strength, where the first regularization strength is lower than the second. For the general scenario, the search range for the hyperparameter regularization strength λ can be [0.001, 0.01, 0.1, 1]. When the first regularization strength (e.g., λ = 0.01) is obtained through cross-validation search, the model's mean squared error is lowest, and 95% of the predicted values deviate from the true values by less than ±3%. For the flash sale scenario, because stronger regularization is needed to combat high-dimensional overfitting, the search range for the regularization strength λ is extended to [0.1, 1, 10, 100]. The second regularization strength (e.g., λ = 10) is obtained through cross-validation search to meet the stricter constraints on model complexity under high-concurrency scenarios.
[0046] In one optional implementation, the method further includes: obtaining the current scenario type to which the current data belongs in the distributed business system; if the current scenario type is a general scenario, then inputting the first feature data of the current data into the performance prediction model of the general scenario to obtain the current throughput; if the current scenario type is a flash sale scenario, then inputting the first feature data and the second feature data of the current data into the performance prediction model of the flash sale scenario to obtain the current throughput.
[0047] During throughput prediction, the current scenario type to which the current data belongs can be obtained. If the current scenario type is a general scenario, first feature data such as concurrency, CPU utilization, memory usage, or network I / O is obtained and input into the performance prediction model of the general scenario to obtain the current throughput. Based on this, feature combinations can be used: multiplying concurrency and CPU utilization to obtain the first interaction feature; multiplying CPU utilization and network I / O to obtain the second interaction feature; multiplying concurrency by itself to obtain the third interaction feature; and inputting the first, second, and third interaction features, along with concurrency, CPU utilization, memory usage, or network I / O, into the performance prediction model of the general scenario. If the current scenario type is a flash sale scenario, first feature data such as concurrency, CPU utilization, memory usage, or network I / O, as well as second feature data, are obtained and input into the performance prediction model of the flash sale scenario to obtain the current throughput. Based on this, feature combinations can also be used to input the first, second, and third interaction features.
[0048] Example 2
[0049] Figure 2 This is a flowchart of another performance prediction method based on a ridge regression model provided in Embodiment 2 of this application. The technical solution of this embodiment is further refined based on the above technical solution. See also Figure 2The performance prediction method based on the ridge regression model shown includes:
[0050] S201. Obtain the sample scenario type to which the sample data in the distributed business system belongs; if the sample scenario type is a general scenario, continue to execute S202; if the sample scenario type is a flash sale scenario, jump to execute S203.
[0051] S202. Based on the ridge regression model, a performance prediction model for general scenarios is constructed using the first feature data of the sample data and the actual throughput of the sample data.
[0052] S203. Determine the sample type to which the sample data belongs based on the second feature data, and determine the sample weight based on the sample type; the sample type is a high-value sample or a basic sample.
[0053] S204. Based on the weighted ridge regression model, using the first feature data, the second feature data, and the sample weights, determine the predicted throughput of the sample data.
[0054] S205. Using the actual throughput and predicted throughput of the sample data, train the ridge regression model to obtain a performance prediction model for the flash sale scenario.
[0055] The second feature data is used to quantify the pressure characteristics of the distributed business system under the flash sale scenario and identify the key performance indicators of system bottlenecks; wherein, the first feature data includes at least one of the following: concurrency, CPU utilization, memory usage or network I / O.
[0056] In one optional implementation, the second feature data includes at least one of the following: database lock wait time, thread pool utilization, number of queue waiting tasks, message queue backlog depth, cache hit rate, connection pool utilization, timeout request ratio, or business error rate.
[0057] In flash sale scenarios, the following key performance indicators (KPIs) are introduced to further improve the accuracy of system throughput prediction and model robustness. The KPIs are defined as follows: Database lock wait time (ms) refers to the average or maximum wait time for database row locks / table locks, directly reflecting the degree of database resource contention under high concurrency; Thread pool utilization (%) refers to the proportion of the number of threads currently executing tasks to the maximum thread pool capacity, reflecting the saturation of thread resources; Queued Tasks refers to the number of requests waiting to be processed in the queue, reflecting the processing load status of the thread pool; Backlog Count refers to the number of messages waiting to be consumed in the message queue, reflecting the backlog pressure on asynchronous processing components; Cache hit rate refers to the hit rate of critical business caches; cache invalidation or penetration under high concurrency will significantly increase the pressure on backend services; Connection pool utilization refers to the proportion of active connections in resources such as the database connection pool and HTTP connection pool to the total number of connections, reflecting the scarcity of connection resources. The timeout request percentage (%) refers to the proportion of requests whose response time exceeds a preset threshold (e.g., 200ms, 500ms), indirectly reflecting system processing latency or resource bottlenecks. The business error rate (%) refers to the proportion of erroneous requests caused by business logic such as "insufficient inventory," "duplicate submissions," or "system overload," characterizing the system's stability. To improve the quality of the second feature set, transient spike data (such as anomalies with thread pool utilization > 100%) can be removed to avoid short-term outliers interfering with model training; extreme scenario samples (such as circuit breaker state data with an error rate > 30%) can be filtered to eliminate the impact of unstable system behavior on the feature distribution.
[0058] In a flash sale scenario, high-value samples are used to reflect resource bottlenecks or abnormal states in the system. Sample data can be divided into high-value samples or basic samples based on whether the second feature data exceeds a preset threshold, and sample weights are dynamically determined based on the sample type; the sample weights for high-value samples and basic samples are different. Using the first feature data, the second feature data, and the corresponding sample weights, a ridge regression model is dynamically weighted and trained to obtain the predicted throughput of the sample data.
[0059] For flash sale scenarios, the sample data is divided into high-value samples or basic samples based on whether the second feature data exceeds a preset threshold. The weighted training of high-value samples makes the model more focused on the bottleneck features of the system, further improving the accuracy of throughput prediction during peak resource contention periods.
[0060] In one optional implementation, determining the sample type of the sample data based on the second feature data and determining the sample weight based on the sample type includes: obtaining a second feature threshold corresponding to the second feature data; comparing the second feature data and the corresponding second feature threshold, and determining whether the sample data belongs to a high-value sample based on the comparison result; if it belongs to a high-value sample, then using a preset second weight as the sample weight; otherwise, using a preset first weight as the sample weight; the first weight is less than the second weight.
[0061] For example, sample data is considered high-value samples if it meets any of the following conditions; otherwise, it is considered basic samples: database lock wait time > database lock wait time threshold (e.g., 100ms); thread pool utilization > thread pool utilization threshold (e.g., 90%); number of queued waiting tasks > queued waiting task threshold (e.g., 1000); message queue backlog depth > message queue backlog depth threshold (e.g., 500); cache hit rate < cache hit rate threshold (e.g., 70%); connection pool utilization > connection pool utilization threshold (e.g., 90%); timeout request ratio > timeout request ratio threshold (e.g., 5%); business error rate > business error rate threshold (e.g., 1%).
[0062] In the sample weighting settings, the second weight of high-value samples is greater than the first weight of basic samples. For example, the first weight is set to 1 and the second weight to 2. By assigning higher weights to high-value samples, the model will prioritize fitting these high-value samples that reflect system bottlenecks during training, thereby enhancing its ability to predict abnormal scenarios and ultimately improving the accuracy of overall throughput prediction.
[0063] In one optional implementation, the predicted throughput of sample data is determined based on a weighted ridge regression model using the first feature data, the second feature data, and the sample weights. This includes: inputting the first feature data, the second feature data, and the sample weights into the weighted ridge regression model, so that the weighted ridge regression model uses the sample weights to determine a weighted objective function; and using the weighted objective function to dynamically weight the sample data, and outputting the predicted throughput of the sample data.
[0064] For flash sale scenarios, sample weights can be integrated with the first and second feature data to form a weighted input matrix. Based on the ridge regression loss function framework, sample weights are introduced to weight the sum of squared residuals, forming a weighted objective function. The regression coefficients are adjusted through optimization algorithms to minimize the weighted objective function, and the predicted throughput is output based on the optimized model parameters.
[0065] Referring to the following formula, for the flash sale scenario, the loss function of the weighted ridge regression model is:
[0066]
[0067] Among them, w i It is the weight of the i-th sample.
[0068] For scenarios involving flash sales, interactive features and multinomial features can be introduced to improve model reliability. For example, the method further includes: multiplying the concurrency number and the CPU utilization rate to obtain a first interactive feature; multiplying the CPU utilization rate and the network I / O to obtain a second interactive feature; multiplying the concurrency number by itself to obtain a third interactive feature; and inputting the first feature data, the second feature data, and the sample weights into a weighted ridge regression model, including: inputting the first interactive feature, the second interactive feature, and the third interactive feature; and inputting the first feature data, the second feature data, and the sample weights into the weighted ridge regression model.
[0069] In addition, dynamic confidence level detection can be added for flash sale scenarios. An alert can be triggered if the second feature data shows extreme values, such as an error rate > 20%. Performance bottleneck analysis can also be introduced to determine the impact coefficient of the second feature data on throughput, for example, "every 1% increase in thread pool utilization leads to a 0.21% decrease in throughput."
[0070] The technical solution of this embodiment, targeting the flash sale scenario, divides sample data into high-value samples or basic samples based on whether the second feature data exceeds a preset threshold. Weighted training of high-value samples allows the model to focus more on system bottleneck features, further improving the accuracy of throughput prediction during peak resource contention periods. This model employs L2 regularization to reduce overfitting risk while retaining all features, making it particularly suitable for scenarios where increased concurrency leads to a high correlation between CPU utilization, memory usage, and network I / O in the performance baseline. Compared to traditional linear regression and L1 regularization models, this invention achieves higher accuracy while retaining all features, avoiding prediction bias caused by feature redundancy in traditional methods. Addressing the differences between test and production environments, relying solely on test environment data is insufficient to fully predict the maximum throughput after a transaction goes live. This performance prediction model can construct a performance prediction system more suitable for the production environment by incorporating a small amount of sampled data from the production environment. Furthermore, the model supports dynamic baseline management, allowing thresholds to be set based on the relationship between predicted throughput and resources, triggering automated performance optimization decisions such as scaling up and down, thereby improving system reliability.
[0071] Example 3
[0072] Figure 3This is a schematic diagram of a performance prediction device based on a ridge regression model according to Embodiment 3 of this application. This embodiment is applicable to performance studies of distributed business systems in the fintech industry. The performance prediction device based on the ridge regression model can be implemented in hardware and / or software, and can be configured in a computer device. (Reference) Figure 3 The specific structure of the performance prediction device 300 based on the ridge regression model is as follows:
[0073] The sample scenario module 310 is used to obtain the sample scenario type to which the sample data in the distributed business system belongs;
[0074] The general model module 320 is used to construct a performance prediction model for a general scenario based on a ridge regression model, using the first feature data of the sample data and the actual throughput of the sample data, if the sample scenario type is a general scenario.
[0075] The flash sale model module 330 is used to construct a performance prediction model for the flash sale scenario based on the ridge regression model, using the first feature data, the second feature data, and the actual throughput of the sample data if the sample scenario type is a flash sale scenario; the second feature data is used to characterize the pressure characteristics and key performance data of the bottleneck of distributed services under the flash sale scenario.
[0076] The first feature data includes at least one of the following: concurrency, CPU utilization, memory usage, and network I / O.
[0077] In one optional implementation, the second feature data includes at least one of the following: database lock wait time, thread pool utilization, number of queue waiting tasks, message queue backlog depth, cache hit rate, connection pool utilization, timeout request ratio, or business error rate.
[0078] The general scenario uses a first regularization strength; the flash sale scenario uses a second regularization strength, where the first regularization strength is lower than the second regularization strength.
[0079] In one optional implementation, the flash sale model module 330 includes:
[0080] A sample weighting unit is used to determine the sample type to which the sample data belongs based on the second feature data, and to determine the sample weight based on the sample type; the sample type is a high-value sample or a basic sample;
[0081] The weighted regression unit is used to determine the predicted throughput of sample data based on the weighted ridge regression model, using the first feature data, the second feature data, and the sample weights.
[0082] The flash sale model unit is used to train the weighted ridge regression model using the actual throughput and predicted throughput of the sample data to obtain a performance prediction model for the flash sale scenario.
[0083] In one optional implementation, the sample weighting unit includes:
[0084] The threshold subunit is used to obtain the second feature threshold corresponding to the second feature data;
[0085] The comparison subunit is used to compare the second feature data with the corresponding second feature threshold, and determine whether the sample data belongs to a high-value sample based on the comparison result;
[0086] The second weighting subunit is used to use the preset second weight as the sample weight if it belongs to a high-value sample.
[0087] The first weighting subunit is used to take a preset first weight as the sample weight if it belongs to the base sample; the first weight is less than the second weight.
[0088] In one alternative implementation, the weighted regression unit includes:
[0089] The objective function subunit is used to input the first feature data, the second feature data and the sample weights into the weighted ridge regression model, so that the weighted ridge regression model uses the sample weights to determine the weighted objective function.
[0090] The dynamic weighting subunit is used to dynamically weight the sample data using the weighting objective function and output the predicted throughput of the sample data.
[0091] In one alternative implementation, the general model module 320 includes:
[0092] The first interaction feature unit is used to multiply the concurrency number and the CPU utilization to obtain the first interaction feature;
[0093] The second interaction feature unit is used to multiply the CPU utilization and the network I / O to obtain the second interaction feature;
[0094] The third interaction feature unit is used to multiply the concurrency number by itself to obtain the third interaction feature;
[0095] A general prediction unit is used to input the first feature data, the first interaction feature, the second interaction feature and the third interaction feature of the sample data into the standard ridge regression model to obtain the prediction throughput output by the standard ridge regression model.
[0096] A general model unit is used to train the standard ridge regression model using the predicted throughput and the actual throughput of the sample data to obtain a performance prediction model for a general scenario.
[0097] In one alternative embodiment, the performance prediction device 300 based on the ridge regression model further includes a throughput prediction module, wherein the throughput prediction module:
[0098] The current scenario unit is used to obtain the current scenario type to which the current data belongs in the distributed business system;
[0099] A general prediction unit is used to input the first feature data of the current data into the performance prediction model of the general scenario if the current scenario type is a general scenario, so as to obtain the current throughput.
[0100] The flash sale prediction unit is used to input the first feature data and the second feature data of the current data into the performance prediction model of the flash sale scenario if the current scenario type is a flash sale scenario, so as to obtain the current throughput.
[0101] The performance prediction device based on the ridge regression model provided in this application can execute the performance prediction method based on the ridge regression model provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the performance prediction method based on the ridge regression model.
[0102] According to embodiments of the present invention, the present invention also provides an electronic device, a readable storage medium, and a computer program product. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the performance prediction method based on the ridge regression model provided in any embodiment of the present invention.
[0103] Example 4
[0104] Figure 4 This is a schematic diagram of the structure of an electronic device 410 implementing the performance prediction method based on the ridge regression model according to embodiments of this application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0105] like Figure 4As shown, the electronic device 410 includes at least one processor 411 and a memory, such as a read-only memory (ROM) 412 or a random access memory (RAM) 413, communicatively connected to the at least one processor 411. The memory stores computer programs executable by the at least one processor. The processor 411 can perform various appropriate actions and processes based on the computer program stored in the ROM 412 or loaded from storage unit 418 into the RAM 413. The RAM 413 may also store various programs and data required for the operation of the electronic device 410. The processor 411, ROM 412, and RAM 413 are interconnected via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.
[0106] Multiple components in electronic device 410 are connected to I / O interface 415, including: input unit 416, such as keyboard, mouse, etc.; output unit 417, such as various types of displays, speakers, etc.; storage unit 418, such as disk, optical disk, etc.; and communication unit 419, such as network card, modem, wireless transceiver, etc. Communication unit 419 allows electronic device 410 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0107] Processor 411 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 411 performs the various methods and processes described above, such as performance prediction methods based on ridge regression models.
[0108] In some embodiments, the ridge regression-based performance prediction method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 418. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 410 via ROM 412 and / or communication unit 419. When the computer program is loaded into RAM 413 and executed by processor 411, one or more steps of the ridge regression-based performance prediction method described above can be performed. Alternatively, in other embodiments, processor 411 can be configured for the ridge regression-based performance prediction method by any other suitable means (e.g., by means of firmware).
[0109] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0110] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0111] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0112] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0113] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0114] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0115] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.
[0116] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A performance prediction method based on a ridge regression model, characterized in that, include: Obtain the sample scenario type to which the sample data belongs in the distributed business system; If the sample scenario type is a general scenario, then based on the ridge regression model, the first feature data of the sample data and the actual throughput of the sample data are used to construct a performance prediction model for the general scenario. If the sample scenario type is a flash sale scenario, then based on the ridge regression model, the first feature data, the second feature data, and the actual throughput of the sample data are used to construct a performance prediction model for the flash sale scenario. The second feature data is used to quantify the pressure characteristics of the distributed business system under the flash sale scenario and identify the key performance indicators of system bottlenecks; wherein, the first feature data includes at least one of the following: concurrency, CPU utilization, memory usage or network I / O.
2. The method according to claim 1, characterized in that, The second feature data includes at least one of the following: database lock wait time, thread pool utilization, number of queue waiting tasks, message queue backlog depth, cache hit rate, connection pool utilization, timeout request ratio, or business error rate; The general scenario uses a first regularization strength; the flash sale scenario uses a second regularization strength, where the first regularization strength is lower than the second regularization strength.
3. The method according to claim 1 or 2, characterized in that, The ridge regression model, using the first and second feature data of the sample data and the actual throughput of the sample data, constructs a performance prediction model for the flash sale scenario, including: The sample type to which the sample data belongs is determined based on the second feature data, and the sample weight is determined based on the sample type; the sample type is either a high-value sample or a basic sample. Based on the weighted ridge regression model, the predicted throughput of the sample data is determined using the first feature data, the second feature data, and the sample weights. The weighted ridge regression model is trained using the actual throughput and predicted throughput of the sample data to obtain a performance prediction model for the flash sale scenario.
4. The method according to claim 3, characterized in that, The step of determining the sample type to which the sample data belongs based on the second feature data, and determining the sample weight based on the sample type, includes: Obtain the second feature threshold corresponding to the second feature data; Compare the second feature data with the corresponding second feature threshold, and determine whether the sample data belongs to a high-value sample based on the comparison result; If it is a high-value sample, then the preset second weight will be used as the sample weight; Otherwise, the preset first weight is used as the sample weight; the first weight is less than the second weight.
5. The method according to claim 3, characterized in that, The method for determining the predictive throughput of sample data based on the weighted ridge regression model, using the first feature data, the second feature data, and the sample weights, includes: The first feature data, the second feature data, and the sample weights are input into the weighted ridge regression model, so that the weighted ridge regression model uses the sample weights to determine the weighted objective function. The sample data is dynamically weighted using the weighted objective function, and the predicted throughput of the sample data is output.
6. The method according to claim 1, characterized in that, The ridge regression model, using the first feature data and the actual throughput of the sample data, constructs a performance prediction model for a general scenario, including: Multiply the number of concurrent users and the CPU utilization rate to obtain the first interaction feature; Multiply the CPU utilization and the network I / O to obtain the second interaction feature; Multiplying the concurrency number by itself yields the third interaction feature; The first feature data, the first interaction feature, the second interaction feature, and the third interaction feature of the sample data are input into the standard ridge regression model to obtain the predicted throughput output by the standard ridge regression model. The standard ridge regression model is trained using the predicted throughput and the actual throughput of the sample data to obtain a performance prediction model for general scenarios.
7. The method according to claim 1, characterized in that, The method further includes: Obtain the current scenario type to which the current data belongs in the distributed business system; If the current scenario type is a general scenario, then the first feature data of the current data is input into the performance prediction model of the general scenario to obtain the current throughput; If the current scenario type is a flash sale scenario, then the first feature data and the second feature data of the current data are input into the performance prediction model of the flash sale scenario to obtain the current throughput.
8. A performance prediction device based on a ridge regression model, characterized in that, include: The sample scenario module is used to obtain the sample scenario type to which the sample data in the distributed business system belongs; A general model module is used to construct a performance prediction model for a general scenario based on a ridge regression model, using the first feature data of the sample data and the actual throughput of the sample data, if the sample scenario type is a general scenario. The flash sale model module is used to construct a performance prediction model for a flash sale scenario based on a ridge regression model, using the first feature data, the second feature data, and the actual throughput of the sample data if the sample scenario type is a flash sale scenario. The second feature data is used to characterize the pressure characteristics and key performance data of the bottleneck of distributed services under the flash sale scenario. The first feature data includes at least one of the following: concurrency, CPU utilization, memory usage, and network I / O.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the performance prediction method based on the ridge regression model as described in any one of claims 1-7.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the performance prediction method based on the ridge regression model according to any one of claims 1-7.