A software running lag optimization and performance improvement debugging method

CN122838256APending Publication Date: 2026-09-29北京缙钰科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610956648.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-30
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0003]但是一般的软件卡顿优化调试方法存在资源调度无差异化的问题,对CPU、内存、磁盘IO、线程调度等不同资源维度采用统一的调配规则与调整幅度,易造成资源分配失衡、核心性能瓶颈无法精准缓解、卡顿优化失效,且优化效果的奖惩机制设计粗糙,无法针对性引导最优优化行为,进而导致性能调试的可靠性差;同时,一般的软件卡顿优化调试方法无法有效捕捉运行环境波动、业务负载动态变化带来的不确定性,无效优化动作占比高、卡顿缓解率低、性能提升幅度有限,且易因单次优化决策偏差造成性能劣化、软件运行异常甚至崩溃,进而导致整体性能调试效果差

Benefits of technology

[0041]1、针对一般软件卡顿优化调试方法存在资源调度无差异化,易造成资源分配失衡、卡顿优化失效,奖惩机制设计粗糙、无法引导最优优化行为,进而导致调试可靠性差的问题,本方案构建性能资源动态调控模块,通过差异化、动态化的资源阈值调控设计,从源头避免性能偏差导致的资源浪费与优化失效;基于自适应调试序列长度设计,进行样本配对校准;将性能价值偏差拆解为即时收益偏差和状态转移概率偏差,精准定位模拟样本与真实样本的偏差来源;进而完成高效样本甄别,确保软件卡顿优化与性能调试的整体可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122838256A_ABST
    Figure CN122838256A_ABST
Patent Text Reader

Abstract

The application discloses a software running lag optimization and performance promotion debugging method, belongs to the technical field of computer software debugging and software performance optimization, and comprises a running state data acquisition module, a performance resource dynamic regulation and control module, a debugging sample library construction module, a software state integrated evolution model module, an adaptive optimization strategy learning module and a lag optimization execution module. The running state data acquisition module acquires software historical running and lag debugging data, and constitutes a software performance observation space. The debugging sample library construction module generates simulation debugging samples by adaptively adjusting a debugging cycle sequence length based on the performance observation space, and constructs a high-quality software debugging sample library. The performance resource dynamic regulation and control module is constructed according to the scheme, and the resource threshold is controlled in a differentiated and dynamic manner, so that the waste of resources and optimization failure caused by performance deviation are avoided from the source. Sample pairing calibration is carried out based on the adaptive debugging sequence length design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer software debugging and software performance optimization, specifically a method for optimizing software performance and improving its performance. Background Technology

[0002] Software performance optimization and debugging falls under the fields of software performance engineering and intelligent operation and maintenance. Specifically, it is a closed-loop debugging system that relies on runtime status awareness, optimization decision-making algorithms, system resource scheduling components, and supporting feedback mechanisms to achieve the identification of stuttering characteristics, location of performance bottlenecks, dynamic allocation of resources, and iterative optimization during software operation.

[0003] However, typical software stuttering optimization and debugging methods suffer from the problem of indiscriminate resource scheduling. They apply uniform allocation rules and adjustment ranges to different resource dimensions such as CPU, memory, disk I / O, and thread scheduling, which can easily lead to resource imbalance, failure to accurately alleviate core performance bottlenecks, and failure of stuttering optimization. Furthermore, the reward and punishment mechanism for optimization effects is poorly designed and cannot specifically guide optimal optimization behavior, resulting in poor reliability of performance debugging. At the same time, typical software stuttering optimization and debugging methods cannot effectively capture the uncertainties brought about by fluctuations in the operating environment and dynamic changes in business load. The proportion of ineffective optimization actions is high, the stuttering relief rate is low, the performance improvement is limited, and performance degradation, software abnormal operation, or even crash can easily be caused by a single optimization decision deviation, resulting in poor overall performance debugging effect. Summary of the Invention

[0004] The purpose of this invention is to provide a method for optimizing software performance and improving its lag, so as to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: including a running status data acquisition module, a performance resource dynamic control module, a debugging sample library construction module, a software state integrated evolution model module, an adaptive optimization strategy learning module, and a lag optimization execution module;

[0006] The running status data acquisition module collects historical running and lag debugging data of the software to form a software performance observation space.

[0007] The performance resource dynamic control module determines the allocation threshold of each performance resource dimension through independent resource control coefficients, thereby realizing on-demand dynamic scheduling of different resource dimensions.

[0008] The debugging sample library construction module is based on the performance observation space and generates simulated debugging samples by adaptively adjusting the length of the debugging cycle sequence to build a high-quality software debugging sample library.

[0009] The software state integrated evolution model module uses a high-quality debugging sample library as training data and adopts maximum expected likelihood as the training objective to fit the transition rules of state, optimization action, next state and immediate performance gain under the software running scenario, and constructs a probabilistic integrated software running state evolution model.

[0010] The adaptive optimization strategy learning module integrates real-time operational observation data with the prediction results of the integrated evolution model, aiming to maximize long-term cumulative performance gains and achieve autonomous learning and iteration of the adaptive stuttering optimization strategy.

[0011] The stuttering optimization execution module performs performance optimization actions based on the real-time running status, completing closed-loop management of software stuttering debugging and performance improvement;

[0012] As a further preferred embodiment of this technical solution, the specific execution steps of the performance resource dynamic control module include:

[0013] Configure a maximum allocation threshold for each resource dimension, including CPU quota, memory allocation, thread scheduling, and IO priority, and use an independent resource control coefficient as the resource allocation weight for each dimension.

[0014] Based on the real-time performance deviation data corresponding to each resource dimension, the resource regulation coefficients of the corresponding dimensions are dynamically updated.

[0015] As a further preferred embodiment of this technical solution, the specific execution steps of the debug sample library construction module include:

[0016] Adaptively adjust the number of optimized action steps in a single debugging cycle sequence to meet the accuracy requirements of different training stages of the strategy;

[0017] A realistic simulated dual sample structure is generated by debugging sequence calibration, and a standardized set of simulated debugging samples is generated.

[0018] Set sample screening threshold conditions to filter simulated debugging samples that meet the deviation requirements;

[0019] The performance value deviation is decomposed into biases to quantify the impact of immediate revenue deviation and state transition probability deviation on long-term performance value.

[0020] Design multi-dimensional real-time performance benefit rules;

[0021] The simulated samples that meet the identification criteria are merged with real debugging samples to build a high-quality software debugging sample library.

[0022] As a further preferred embodiment of this technical solution: the immediate performance benefits include three categories: lag improvement benefits, performance deviation guidance benefits, and system resource protection benefits;

[0023] The optimal optimization standard for improving stuttering performance is to ensure smooth and lag-free operation and meet the core performance indicators. Other optimization effects are rewarded or penalized according to the value tier.

[0024] The performance deviation-guided benefit is quantitatively evaluated by taking the dimension with the largest deviation among all performance indicators;

[0025] The system resource protection benefits are designed with reward and punishment rules that combine system resource usage thresholds and the characteristics of concurrent operation of multiple software processes.

[0026] As a further preferred embodiment of this technical solution, the specific execution steps of the software state integration evolution model module include:

[0027] Construct an integrated software runtime state evolution model to fit the continuous transition patterns of state, optimization actions, next state, and immediate performance gains under software runtime scenarios;

[0028] The maximum expected likelihood criterion is used to construct the model training objective and complete the synchronous training of the ensemble sub-models;

[0029] As a further preferred embodiment of this technical solution, the specific execution steps of the adaptive optimization strategy learning module include:

[0030] Construct an end-to-end optimization strategy network, taking the software operation observation status as input, and outputting the distribution of optimization action instructions and resource control coefficients for each resource dimension;

[0031] Define long-term cumulative performance gains to evaluate the overall execution value of continuous optimization actions;

[0032] Construct a clip-style objective function to achieve iterative updates of the optimization strategy;

[0033] As a further preferred embodiment of this technical solution: the specific execution steps of the stuttering optimization execution module include:

[0034] Optimization strategy generation: Combining the trained software state integrated evolution model with the adaptive optimization strategy, the final debugging decision is generated. The real-time collected running observation state is input into the strategy network, and the optimal optimization action instruction and the allocation threshold of each resource dimension are output. At the same time, the observed state and optimization action are input into the state evolution model to predict the software running state and performance improvement effect in the next stage.

[0035] Re-decision design: Introduce a software lag risk warning mechanism, set dual trigger conditions to initiate optimization re-decision, and only adjust and optimize low-return, high-risk optimization schemes;

[0036] Debugging actions are implemented by converting the optimal optimization action instructions and resource allocation thresholds into system resource scheduling instructions and implementing software lag optimization and performance debugging actions.

[0037] As a further preferred embodiment of this technical solution: after the operation status data acquisition module acquires historical operation and debugging raw data, it preprocesses the raw data. The preprocessing includes missing value imputation, outlier handling and standardization. After processing, a standardized software performance observation space is formed.

[0038] As a further preferred embodiment of this technical solution: the software state integrated evolution model is composed of multiple sub-models with the same network structure but different initialization parameters; during the training phase, a unified optimizer is used to complete iterative training, and an early stopping strategy is added during the training process to avoid overfitting; during the prediction phase, the output results of all sub-models are fused to obtain a unified predicted value of the software running state.

[0039] As a further preferred embodiment of this technical solution: the optimization strategy network adopts a fully connected network structure, with the input layer dimension consistent with the feature dimension of the software performance observation space, and multiple hidden layers in the middle paired with nonlinear activation functions; the network output is divided into two paths, one using a Gaussian distribution to output the optimized action instruction distribution, and the other using a Sigmoid activation to output a resource regulation coefficient with a fixed value range; a value network is built to fit the long-term performance value corresponding to the state-action relationship, and the strategy network and value network are jointly trained, while loading offline high-quality sample libraries and real-time online running data to complete bidirectional learning.

[0040] Compared with the prior art, the beneficial effects of the present invention are:

[0041] 1. To address the issues of undifferentiated resource scheduling in general software stuttering optimization and debugging methods, which easily leads to resource allocation imbalances, optimization failures, and poorly designed reward and punishment mechanisms that fail to guide optimal optimization behavior, resulting in poor debugging reliability, this solution constructs a dynamic performance resource control module. Through differentiated and dynamic resource threshold control design, it avoids resource waste and optimization failures caused by performance deviations from the source. Based on an adaptive debugging sequence length design, it performs sample pairing calibration. It decomposes performance value deviation into immediate benefit deviation and state transition probability deviation, accurately locating the source of deviation between simulated samples and real samples. This enables efficient sample identification, ensuring the overall reliability of software stuttering optimization and performance debugging.

[0042] 2. To address the issues that general software stuttering optimization and debugging methods suffer from, such as failure to capture the uncertainties of the runtime process, numerous ineffective optimizations, low stuttering mitigation rates, and susceptibility to performance degradation and operational anomalies due to single decision failures, leading to poor debugging results, this solution employs three dimensions—stuttering improvement, performance deviation guidance, and system resource protection—to construct immediate performance benefits. This achieves a refined reward design with dual constraints of performance improvement and system stability, adapting to various uncertain scenarios in various operating environments and business workloads. A re-decision mechanism is designed with both predicted immediate benefits and performance risk values ​​as dual trigger conditions. This ensures that re-decision covers all ineffective and high-risk optimization behaviors while avoiding meaningless blind adjustments, comprehensively covering various decision-making scenarios in software performance debugging. Ultimately, this effectively improves the overall effect of software stuttering optimization and performance improvement debugging. Attached Figure Description

[0043] Figure 1 This is a schematic diagram of the structure of a software lag optimization and performance improvement debugging method according to the present invention. Figure 1 ;

[0044] Figure 2 This is a schematic diagram of the structure of a software lag optimization and performance improvement debugging method according to the present invention. Figure 2 . Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] Example

[0047] Please see Figures 1-2 This is a schematic diagram of some embodiments of a software operation lag optimization and performance improvement debugging method used in this application.

[0048] Example 1

[0049] This embodiment illustrates the overall architecture and execution process of the method. The software operation lag optimization and performance improvement debugging method relies on the collaborative efforts of six functional modules to achieve closed-loop management of the entire process. The six modules are, in order, the operation status data acquisition module, the performance resource dynamic control module, the debugging sample library construction module, the software state integrated evolution model module, the adaptive optimization strategy learning module, and the lag optimization execution module.

[0050] The running status data acquisition module collects historical running data and lag debugging records of the software. After preprocessing, it forms a standardized performance observation space and sends the observation data to the performance resource dynamic control module.

[0051] The performance resource dynamic control module determines the upper limit of allocation for each resource dimension through independent resource control coefficients, realizes on-demand dynamic scheduling of different dimensions such as CPU, memory, IO, and threads, and sends the control parameters to the debug sample library construction module.

[0052] The debugging sample library construction module generates simulated debugging samples based on observational spatial data by adaptively adjusting the length of the debugging cycle sequence. After sample screening, a high-quality software debugging sample library is constructed, and the sample data is sent to the software state integration and evolution model module.

[0053] The software state integrated evolution model module uses a high-quality sample library as training data and adopts maximum expected likelihood as the training objective to fit the transition rules of "current state, optimization action, next state, and immediate benefit" in the software operation scenario, construct a software state evolution prediction model integrating multiple sub-models, and send the prediction results to the adaptive optimization strategy learning module.

[0054] The adaptive optimization strategy learning module integrates real-time operational observation data with the prediction results of the integrated evolution model to complete the autonomous learning and optimization of the strategy with the goal of maximizing long-term cumulative performance gains, and sends the final optimized strategy to the stuttering optimization execution module.

[0055] The stuttering optimization execution module receives policy instructions and combines them with real-time running status to complete optimization actions and risk re-decision, thereby achieving continuous iterative optimization of software stuttering debugging and performance improvement.

[0056] Example 2

[0057] This embodiment describes the specific implementation of the running status data acquisition module based on Embodiment 1.

[0058] The runtime status data acquisition module collects all raw data from the software operation. After preprocessing, it forms a standardized performance observation space, with the core observation dimensions represented as follows:

[0059] It includes four categories of features: core software performance indicators, system resource status, lag characteristics, and operating environment interference. Specifically, it covers indicators such as frame rate, interface response latency, lag duration, CPU utilization, memory utilization, disk I / O load, number of background processes, and degree of system resource contention.

[0060] The data acquisition frequency is set according to the software's frame rate. The format of a single sample in the historical real-time debugging sample library is "current observation status, optimization action, immediate benefit, and next observation status", which is used for subsequent model training and policy learning.

[0061] Preprocessing operations include missing value imputation, outlier handling, and standardization: missing performance metrics are imputed using interpolation; sudden abnormal peak data are removed using statistical criteria; all features are uniformly normalized to eliminate the interference of different units on model training, and finally output a standardized performance observation space.

[0062] Example 3

[0063] This embodiment describes the specific implementation of the performance resource dynamic control module based on the above embodiments.

[0064] The dynamic performance resource control module independently determines allocation thresholds for different resource dimensions such as CPU quota, memory allocation, thread scheduling priority, and disk I / O priority. It dynamically adjusts the resource allocation ratio for each dimension based on real-time performance deviations and the severity of stuttering, achieving elastic, on-demand control of system resources. Each resource dimension executes its control logic independently, without interference.

[0065] First, determine the allocation limit for each resource dimension, and configure the system's rated maximum allocateable resources for each resource dimension. Using an independent resource control coefficient as the allocation constraint, the calculation method for the available resource limit for a single dimension is as follows:

[0066] ;

[0067] in, This represents the upper limit of available resources in the i-th resource dimension; is the resource control coefficient for the i-th resource dimension, with a value ranging from 0 to 1. Each dimension is calculated independently. The smaller the coefficient, the stricter the resource restriction and the lower the allocation amount. The maximum configurable resources for the system in the i-th resource dimension are determined by hardware configuration and system scheduling rules.

[0068] The resource regulation coefficient is dynamically updated based on real-time performance deviations, adjusting it according to the deviation between the actual and target performance indicators for each dimension. Dimensions with larger deviations and more severe lag are adjusted by increasing the regulation coefficient and relaxing resource quotas; dimensions with surplus performance and no risk of lag are adjusted by decreasing the coefficient and tightening resource usage to avoid waste. When the deviation exceeds the maximum allowable threshold, emergency resource scheduling for that dimension is triggered, prioritizing the core software operation requirements.

[0069] Example 4

[0070] This embodiment describes the specific implementation of the debugging sample library construction module based on the above embodiments.

[0071] The debugging sample library construction module is based on the performance observation space. It uses a state evolution model to generate simulated debugging samples, selects high-quality simulated samples by identifying performance value deviations, and finally merges qualified simulated samples with real samples to build a high-quality software debugging sample library.

[0072] The first step is to design an adaptive debugging sequence length. To adapt to the accuracy requirements of different training stages of the strategy, the number of optimization action steps contained in a single debugging cycle sequence is dynamically adjusted to avoid the accumulation of sample bias caused by a fixed number of steps. In the early stage of training, a shorter sequence length is used to ensure the stability of basic training, and in the later stage of training, the sequence length is gradually increased to adapt to the decision logic of the full performance optimization cycle.

[0073] The second step is to calibrate the debugging sequence. To ensure that the simulated debugging sequence and the real debugging sequence are accurately matched in the state-action dimension, a real-simulation dual sample structure is generated through sequence alignment. This ensures that the simulated samples and the real samples are highly matched in action sequences and state transition paths, thus generating a standardized set of simulated samples.

[0074] The third step is sample screening. Set a threshold for screening sample value deviation, select high-quality simulated samples with high consistency with the value of real samples, and remove inferior samples with excessive deviation. The screening rule is that the difference in long-term performance value between real samples and simulated samples does not exceed the set threshold, and the threshold value ranges from 0.05 to 0.2.

[0075] The fourth step is bias decomposition. The performance value bias is decomposed into two parts: immediate return bias and state transition probability bias. The impact of these two types of bias on long-term performance value is quantified, the source of bias between simulated and real samples is accurately located, and the interpretability of sample identification is improved.

[0076] The fifth step is to design immediate performance benefits. Immediate performance benefits include three categories: benefits from improved stuttering, benefits from performance deviation guidance, and benefits from system resource protection. These three are weighted and summed, with a total weight of 1.

[0077] Lag Improvement Benefits: The optimal standard is a smooth interface without lag, core performance indicators meet the standards, and there are no functional abnormalities. For other cases, rewards and penalties are set according to the performance improvement gradient. The greater the lag elimination and frame rate improvement, the higher the reward. If lag worsens or performance degrades after optimization, penalties are set. There is no benefit when no optimization action is taken.

[0078] Performance Deviation-Driven Benefits: Select the dimension with the largest deviation among all performance indicators for quantitative evaluation. The smaller the deviation, the higher the reward, guiding resources to be tilted towards the performance bottleneck dimension.

[0079] System resource protection benefits: Designed in conjunction with system resource usage thresholds and multi-process concurrency characteristics, a neutral benefit is given when resource usage is within a safe range and there is no excessive use of system resources. When resource usage exceeds the threshold and affects the normal operation of other processes, a penalty is imposed to ensure the overall stability of the system.

[0080] The sixth step is to construct a high-quality sample library. Simulated samples that pass the screening threshold are merged with real debugging samples to obtain the final high-quality sample library. Value calculation adopts a two-step logic: first, a value calculation network that can be used for sample screening is obtained through pre-training of the policy network; then, the policy network is formally trained using the screened high-quality sample library to achieve precise optimization of the optimization policy.

[0081] Example 5

[0082] This embodiment describes the specific implementation of the software state integration evolution model module based on the above embodiments.

[0083] The software state integrated evolution model module constructs a state evolution model integrating multiple sub-models. It uses a high-quality debugging sample library as training data and the maximum expected likelihood as the training objective to fit the transition patterns of observed state, optimized action, next stage state and immediate benefit under the software operation scenario. At the same time, it captures the environmental uncertainty and random fluctuations in the software operation process through multiple sub-models, thereby improving the robustness and generalization ability of the model.

[0084] Each ensemble sub-model fits the continuous transition pattern between state and reward, and its output includes two parts: the predicted mean and the predicted uncertainty, which generally conforms to the characteristics of a continuous probability distribution. The predicted mean corresponds to the core prediction result of the software's operating state and performance gains, while the predicted uncertainty corresponds to the degree of fluctuation in the result; higher uncertainty indicates stronger random interference in the operating scenario. The predicted state data needs to be inversely normalized to restore it to its actual energy dimension for subsequent bias judgment and risk assessment.

[0085] The number of ensemble sub-models is set to 8 to 12. Each sub-model has the same network structure and training objectives, with only the initialization parameters being different. By training multiple sub-models independently, cognitive and accidental uncertainties in the software operation process are captured, thereby improving the model's adaptability to complex operating environments.

[0086] The model training objective is constructed using the maximum expected likelihood criterion. Based on all samples in the high-quality sample library, it maximizes the expected logarithm of the likelihood probability corresponding to the sample, so that the model gradually fits the real software running state transition law.

[0087] The model was trained using the Adam optimizer with a learning rate of 1e-4 to 5e-4 and a batch size of 32 to 64. Training continued until the loss function converged or the maximum number of training epochs was reached. An early stopping strategy was employed during training: training was stopped if the validation set loss did not decrease for several consecutive epochs to prevent overfitting.

[0088] Example 6

[0089] This embodiment describes the specific implementation of the adaptive optimization strategy learning module based on the above embodiments.

[0090] The adaptive optimization strategy learning module relies on the state prediction, benefit prediction and uncertainty assessment results output by the integrated state evolution model. With the core objective of maximizing long-term cumulative performance benefits, it learns the mapping rules from observed states to optimization actions and resource coefficients through a policy network based on a high-quality sample library and real-time operation feedback data, so as to realize the iterative adaptive performance optimization strategy without human preset rules.

[0091] The module employs an Actor-Critic dual-network architecture. The Actor network optimizes the policy and is responsible for outputting action distribution and resource control coefficients; the Critic network is responsible for fitting the long-term value of state-action relationships. During the pre-training phase, only the value network is trained for sample selection. In the formal training phase, both networks are trained jointly to achieve end-to-end optimization.

[0092] First, an end-to-end optimization policy network is constructed, taking the observed state of software operation as input and outputting the distribution of optimized action instructions and resource regulation coefficients for each resource dimension. The policy network adopts a fully connected network structure, with the input layer dimension consistent with the feature dimension of the observation space, 3 to 4 hidden layers, and 128 to 256 neurons per layer, using ReLU activation function. The output layer is divided into two paths: the action distribution uses a Gaussian distribution for output, and the resource regulation coefficients use a Sigmoid activation output, ensuring that the values ​​are within the range of 0 to 1. The value network takes the concatenated vector of observed state and action as input and outputs the corresponding long-term performance value. The network structure is consistent with the policy network, and the output layer is a linear layer.

[0093] Long-term cumulative performance gains are defined to evaluate the overall value of continuous optimization actions. The calculation method involves multiplying the immediate gains of each step in the debugging sequence by a discount factor corresponding to the step size, starting from the current moment, and then summing the results. The discount factor reflects the degree of influence of future gains on the current decision; the closer the value is to 1, the higher the weight of long-term performance gains. Immediate gains need to be standardized and mapped to a fixed interval to improve the stability of policy learning.

[0094] A clipping-style objective function is constructed to implement policy updates. First, the ratio of action probabilities before and after the policy update is calculated. Then, combined with the dominance function of the corresponding state-action relationship, upper and lower limits are set for the clipping range of the probability ratio. The minimum value of the two calculated results before and after clipping is taken as the objective term. Finally, the policy network parameters are updated with the goal of maximizing the overall expectation of the objective term. This mechanism can limit the magnitude of a single round of policy updates, avoid large policy oscillations, and ensure the stability of the training process.

[0095] During the formal training phase, the policy network and value network are jointly optimized. The value network uses mean squared error loss to fit the long-term cumulative return, while the policy network uses a clipped objective function for optimization. Both networks share the Adam optimizer. An experience replay pool is introduced during training to store real-time interactive data, enabling a combination of offline sample training and online interactive learning.

[0096] Example 7

[0097] This embodiment describes the specific implementation of the stuttering optimization execution module based on the above embodiments.

[0098] The stuttering optimization execution module combines the trained ensemble evolution model with adaptive optimization strategies to output the final performance debugging solution. At the same time, it introduces risk warning and re-decision mechanism to ensure stable and efficient iteration of software stuttering optimization.

[0099] The first step is to generate an optimization strategy. Real-time software operation observations are input into the strategy network, which outputs optimal optimization action instructions and resource allocation thresholds for each dimension. Simultaneously, the current observation state and optimization actions are integrated into a state evolution model to predict the next stage of software operation, the effect of lag improvement, and resource consumption, thus pre-judging the rationality of the optimization plan. If the prediction results indicate no performance improvement, excessive resource consumption, or functional abnormalities, the optimization actions and resource allocation are adjusted in real-time through the strategy network. After the resource thresholds are output, a limiting process is applied, setting the minimum allocated resources to 5% to 10% of the rated maximum resources to prevent zero resource allocation from causing software malfunctions.

[0100] The second step is the design of critical decision-making. A software stuttering risk warning mechanism is introduced, using both predicted immediate benefits and performance risk values ​​as dual trigger conditions. This covers optimization scenarios with low benefits and high risks, while avoiding meaningless and frequent re-decision-making, thus ensuring stable software operation.

[0101] First, the state and immediate benefit at the next moment are predicted by an integrated state evolution model, and the average of the prediction results of all sub-models is taken as the final prediction value. Then, the performance risk value is calculated based on the predicted state to quantify the probability of increased lag, resource overload, and functional abnormality. The degree of risk is calculated by the similarity between the predicted features and the safety threshold.

[0102] Set two trigger conditions for re-decision, and a re-decision will be triggered if either condition is met: First, the predicted immediate benefit is less than 0, which means that the solution is expected to have no optimization effect or even degrade performance; Second, the performance risk value is greater than or equal to the set risk threshold, which means that the solution has a high operational risk.

[0103] After a re-decision is triggered, the optimization strategy network regenerates the debugging plan, adjusts action instructions and resource allocation, until the triggering conditions are no longer met. The maximum number of re-decision attempts is set to 3 to 5. If the conditions are still not met after exceeding the number of attempts, the optimization action for the current dimension is terminated, and the system is restored to the baseline operating state to avoid severe software lag or crashes.

[0104] The third step is to optimize the execution of actions. The optimal optimization action instructions and resource allocation thresholds are converted into system resource scheduling instructions and sent to the corresponding modules in the system kernel for execution. This completes specific debugging actions such as thread priority adjustment, memory quota allocation, and I / O scheduling optimization. After each round of optimization, the complete status, actions, and performance feedback data of this debugging are stored in the experience replay pool for continuous iterative updates of the model and strategy, forming a complete closed loop of "monitoring-optimization-feedback-iteration".

[0105] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0106] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.

[0107] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for optimizing software performance and improving its lag, characterized in that: It includes a runtime status data acquisition module, a performance resource dynamic control module, a debug sample library construction module, a software state integrated evolution model module, an adaptive optimization strategy learning module, and a lag optimization execution module; The running status data acquisition module collects historical running and lag debugging data of the software to form a software performance observation space. The performance resource dynamic control module determines the allocation threshold of each performance resource dimension through independent resource control coefficients, thereby realizing on-demand dynamic scheduling of different resource dimensions. The debugging sample library construction module is based on the performance observation space and generates simulated debugging samples by adaptively adjusting the length of the debugging cycle sequence to build a high-quality software debugging sample library. The software state integrated evolution model module uses a high-quality debugging sample library as training data and adopts maximum expected likelihood as the training objective to fit the transition rules of state, optimization action, next state and immediate performance gain under the software running scenario, and constructs a probabilistic integrated software running state evolution model. The adaptive optimization strategy learning module integrates real-time operational observation data with the prediction results of the integrated evolution model, aiming to maximize long-term cumulative performance gains and achieve autonomous learning and iteration of the adaptive stuttering optimization strategy. The stuttering optimization execution module performs performance optimization actions based on the real-time running status, completing closed-loop management of software stuttering debugging and performance improvement.

2. The method for optimizing software performance and improving its performance according to claim 1, characterized in that: The specific execution steps of the performance resource dynamic control module include: Configure a maximum allocation threshold for each resource dimension, including CPU quota, memory allocation, thread scheduling, and IO priority, and use an independent resource control coefficient as the resource allocation weight for each dimension. Based on real-time performance deviation data corresponding to each resource dimension, the resource regulation coefficients for the corresponding dimensions are dynamically updated.

3. The method for optimizing software performance and improving its performance according to claim 2, characterized in that: The specific execution steps of the debug sample library construction module include: Adaptively adjust the number of optimized action steps in a single debugging cycle sequence to meet the accuracy requirements of different training stages of the strategy; A realistic simulated dual sample structure is generated by debugging sequence calibration, and a standardized set of simulated debugging samples is generated. Set sample screening threshold conditions to filter simulated debugging samples that meet the deviation requirements; The performance value deviation is decomposed into biases to quantify the impact of immediate revenue deviation and state transition probability deviation on long-term performance value. Design multi-dimensional real-time performance benefit rules; Simulated samples that meet the identification criteria are merged with real debugging samples to build a high-quality software debugging sample library.

4. The method for optimizing software performance and improving its performance according to claim 3, characterized in that: The immediate performance benefits include three categories: lag improvement benefits, performance deviation guidance benefits, and system resource protection benefits. The optimal optimization standard for improving stuttering performance is to ensure smooth and lag-free operation and meet the core performance indicators. Other optimization effects are rewarded or penalized according to the value tier. The performance deviation-guided benefit is quantitatively evaluated by taking the dimension with the largest deviation among all performance indicators; The system resource protection benefits are designed with reward and punishment rules that combine system resource usage thresholds and the characteristics of concurrent operation of multiple software processes.

5. The software lag optimization and performance improvement debugging method according to claim 4, characterized in that: The specific execution steps of the software state integration evolution model module include: Construct an integrated software runtime state evolution model to fit the continuous transition patterns of state, optimization actions, next state, and immediate performance gains under software runtime scenarios; The maximum expected likelihood criterion is used to construct the model training objective and complete the synchronous training of the ensemble sub-models.

6. The method for optimizing software performance and improving its performance according to claim 5, characterized in that: The specific execution steps of the adaptive optimization strategy learning module include: Construct an end-to-end optimization strategy network, taking the software operation observation status as input, and outputting the distribution of optimization action instructions and resource control coefficients for each resource dimension; Define long-term cumulative performance gains to evaluate the overall execution value of continuous optimization actions; Construct a clip-style objective function to enable iterative updates of the optimization strategy.

7. The method for optimizing software performance and improving its performance according to claim 6, characterized in that: The specific execution steps of the stuttering optimization module include: Optimization strategy generation: Combining the trained software state integrated evolution model with the adaptive optimization strategy, the final debugging decision is generated. The real-time collected running observation state is input into the strategy network, and the optimal optimization action instruction and the allocation threshold of each resource dimension are output. At the same time, the observed state and optimization action are input into the state evolution model to predict the software running state and performance improvement effect in the next stage. Re-decision design: Introduce a software lag risk warning mechanism, set dual trigger conditions to initiate optimization re-decision, and only adjust and optimize low-return, high-risk optimization schemes; Debugging actions are implemented by converting the optimal optimization action instructions and resource allocation thresholds into system resource scheduling instructions, and then implementing software lag optimization and performance debugging actions.

8. The method for optimizing software performance and improving lag according to claim 7, characterized in that: After collecting historical running and debugging raw data, the running status data acquisition module preprocesses the raw data. The preprocessing includes missing value imputation, outlier handling, and standardization. After processing, a standardized software performance observation space is formed.

9. The method for optimizing software performance and improving its performance according to claim 8, characterized in that: The software state integration evolution model is composed of multiple sub-models with the same network structure but different initialization parameters. During the training phase, a unified optimizer is used to complete iterative training, and an early stopping strategy is incorporated during the training process to avoid overfitting. During the prediction phase, the output results of all sub-models are merged to obtain a unified predicted value of the software running state.

10. The method for optimizing software performance and improving its performance according to claim 9, characterized in that: The optimization strategy network adopts a fully connected network structure. The input layer dimension is consistent with the feature dimension of the software performance observation space. Multiple hidden layers are set in the middle and paired with nonlinear activation functions. The network output is divided into two paths: one path uses a Gaussian distribution to output the optimized action command distribution, and the other path uses a Sigmoid activation to output a resource regulation coefficient with a fixed value range. A value network is built to fit the long-term performance value corresponding to the state-action relationship. The strategy network and the value network are jointly trained, and high-quality offline sample libraries and real-time online running data are loaded to complete bidirectional learning.