Software stability evaluation system for software development
By applying ecological modeling of the Lotka-Volterra equation and NSGA-II multi-objective optimization algorithm in the software system, combined with module health index and dynamic resource allocation suggestions, the problem of difficulty in taking into account stability and fairness in resource allocation in the existing technology is solved, and the system resource utilization efficiency and operating performance are improved.
Patent Information
- Application Number
- CN202510183585.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-06-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When the prior art faces a highly dynamic and multi-objective conflict application environment in complex software systems, it is difficult to achieve comprehensive consideration of the stability and fairness of resource allocation, which makes it difficult for resource allocation solutions to take into account multiple performance indicators, affecting the overall performance of the system.
The ecological modeling of the Lotka-Volterra equation and the NSGA-II multi-objective optimization algorithm are used, and the module health index and dynamic resource allocation suggestions are combined to generate a resource allocation plan that takes into account system stability and fairness.
Through the combination of dynamic ecological modeling and multi-objective optimization algorithms, dynamic adaptive adjustment of resource allocation is achieved, the system's resource utilization efficiency and operating performance are improved, and the stability and fairness of resource allocation are ensured.
Smart Images

Figure CN120123235A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software system resource management, and particularly to a software stability evaluation system for software development. Background Art
[0002] In the context of the rapid development of information technology and intelligence today, complex software systems are increasingly widely used in various application scenarios. Whether in the fields of finance, healthcare, or transportation, while these systems provide efficient services, they also face major challenges in resource allocation and system stability. Existing resource allocation technologies usually rely on static allocation rules and simple scheduling algorithms. These methods work well in dealing with simple application scenarios, but their limitations gradually emerge when facing application environments with high dynamics, complexity, and multi-objective conflicts.
[0003] In the prior art, resource allocation methods mainly focus on single-objective optimization, often only paying attention to a certain aspect of system performance indicators, such as minimizing response time or maximizing throughput. Although this single-optimization-objective approach can achieve certain effects in specific scenarios, it cannot effectively solve the problem of multi-objective conflicts during system operation. For example, in some distributed systems, it is a common requirement to ensure both the stability and fairness of resource allocation simultaneously. However, traditional technologies lack in-depth exploration of multi-objective optimization and fail to comprehensively consider stability and fairness, resulting in resource allocation schemes being difficult to balance multiple performance indicators and ultimately affecting the overall performance of the system.
[0004] In addition, in the prior art, resource allocation strategies are usually based on fixed rules or static weight configurations. This static resource management method is difficult to adapt to the changing requirements during system operation. For example, in high-load scenarios, the resource requirements of different modules may change dynamically, and some modules are more critical to system stability and performance. However, static allocation strategies cannot adjust resources in a timely manner to adapt to the resource competition situation among modules, resulting in low system resource utilization and reduced operation efficiency.
[0005] Some current improvement methods attempt to introduce causal analysis and model-driven methods for resource allocation, but these methods often only focus on the dependency relationships between modules and ignore the dynamic change process of resource competition and collaboration. The resource competition among modules is a complex dynamic ecological process, and traditional correlation analysis methods are difficult to accurately model this complex relationship, resulting in resource allocation schemes lacking a scientific basis. In addition, the definition and application of module health indices in the prior art are relatively limited. Only simple performance indicators are used to evaluate the module state, lacking a comprehensive analysis of the module's resource competition ability and stability, which further limits the optimization space of resource allocation strategies.
[0006] In terms of optimization algorithms, traditional genetic algorithms or other single-objective optimization algorithms have improved the resource allocation efficiency to a certain extent. However, these algorithms perform poorly in dealing with multi-objective optimization problems. Especially when there is a conflict between stability and fairness, it is difficult for traditional algorithms to find a reasonable balance point. Although the NSGA-II algorithm, which has wide applications in the field of multi-objective optimization, has theoretical advantages, its practical application in resource allocation still has limitations. Especially in dynamic resource allocation scenarios, the algorithm needs to be adjusted according to specific application scenarios to adapt to dynamic changing requirements, and the research and application in this aspect are still immature.
[0007] At the same time, in the existing technology, the fairness evaluation method of resource allocation schemes is relatively simple. Most of them only measure through the balance of resource allocation ratios, ignoring the actual resource requirements and importance differences between modules. This simplistic fairness evaluation method may lead to insufficient resources for key modules or resource waste for non-key modules, further affecting the stability and overall performance of the system. In addition, traditional methods mostly take system performance as the sole goal when optimizing resource allocation, lacking consideration of fairness for different user groups, modules or operation scenarios, which may cause unreasonable or even unfair resource allocation in specific situations.
[0008] Therefore, how to provide a software stability evaluation system for software development is an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0009] An object of the present invention is to propose a software stability evaluation system for software development. The present invention fully combines the ecological modeling ability of the Lotka-Volterra equation and the NSGA-II multi-objective optimization algorithm, and constructs a resource allocation scheme that takes into account both system stability and fairness through module health indices and dynamic resource allocation suggestions. The present invention details the methods for dynamic modeling of resource competition, calculation of module health indices, and generation of resource allocation strategies based on multi-objective optimization, and has the advantages of strong adaptability, high stability, and good fairness, and can effectively improve the resource utilization efficiency and operating performance of complex systems in high-load and dynamic environments.
[0010] A software stability evaluation system for software development according to an embodiment of the present invention includes:
[0011] A data collection and preprocessing module for collecting user behavior data and system performance metrics;
[0012] A user behavior modeling module for modeling user behavior data based on psychological models;
[0013] An abnormal behavior detection module for detecting abnormal user behaviors and evaluating the potential impact on system stability;
[0014] A stress test generation and execution module for generating simulation data and executing stress tests;
[0015] A causal relationship optimization module for optimizing the edge weights of a causal relationship graph through a genetic algorithm;
[0016] A module ecological modeling and analysis module for establishing a resource competition and cooperation model among modules;
[0017] A multi-objective optimization module for optimizing the resource allocation strategy based on the module health index and balance requirements;
[0018] An interpretability and decision-making module for parsing the decision-making process of an evaluation model and generating a decision report.
[0019] Optionally, the modules are implemented through the following methods:
[0020] S1. Collect user behavior data, clean and preprocess the data for standardization, extract key features and generate a user behavior data set;
[0021] S2. Based on the user behavior data set, model through the deep learning model Transformer, extract sequence features and generate a user behavior feature vector;
[0022] S3. Based on the user behavior feature vector, apply the Isolation Forest algorithm to detect abnormal behaviors, output an abnormal behavior risk scoring table, and mark high-risk user behaviors;
[0023] S4. According to the marked high-risk user behaviors, use the simulation tool Locust to generate simulation data of user behaviors, dynamically adjust test parameters, verify the impact of high-risk behaviors on the stability of the target application system through stress tests, and output stress test results;
[0024] S5. Combine the abnormal behavior risk scoring table and stress test results, and use a genetic algorithm to optimize the weights of the causal relationship graph to generate an optimized causal model;
[0025] S6. Use the optimized causal model and stress test results to establish an ecological model of resource competition based on the Lotka-Volterra equation, calculate the module health index and dynamically update the resource allocation suggestions among modules;
[0026] S7. Based on the module health index and resource allocation suggestions among modules, use the NSGA-II multi-objective optimization algorithm to generate a resource allocation strategy that takes into account both stability and fairness, and output the optimal resource allocation plan;
[0027] S8. Analyze the key influencing factors of the resource allocation decision for the generated optimal resource allocation plan, extract the decision logic, and generate a decision report.
[0028] Optionally, the S3 specifically includes:
[0029] S31. Receive the user behavior feature vector as input, organize it into a feature matrix, where each row is a sample and each column is the corresponding feature dimension, and generate a data set;
[0030] S32. Based on the data set, initialize the Isolation Forest algorithm, set the sub-sample size, the number of decision trees, and the splitting strategy, and construct a model structure for splitting the user behavior feature space;
[0031] S33. Use the initialized Isolation Forest algorithm to train the data set, generate a decision tree model by recursively and randomly splitting the sample space, and learn the normal distribution pattern of user behavior;
[0032] S34. Input the user behavior feature vector into the trained Isolation Forest model, and calculate the anomaly score for each sample according to the statistical result of the path length of the sample in the decision tree:
[0033]
[0034] where S(x) is the anomaly score of sample x, t is the number of decision trees, h j (x) is the path length of sample x in the j-th decision tree, H(n - 1) is the harmonic number of the (n - 1)-th term, and n is the total number of samples;
[0035] S35. Based on the generated anomaly scores, dynamically adjust the risk scoring threshold, filter the samples higher than the threshold, mark them as high-risk user behaviors, and sort the high-risk samples by combining the anomaly scores and the weight priorities:
[0036]
[0037] S sorted = Sort({s(x i )·w(x i ) | Risk(x i ) = 1}, desc);
[0038] where Risk(x i ) is the risk label of the sample, s(x i ) is the anomaly score of the sample, μ s is the mean of the anomaly scores, σ sis the standard deviation of the anomaly score, k is the adjustment factor of the risk threshold, λ is the weight of the dynamic adjustment factor, f(x i ) is the specific attribute function of the sample, S sorted is the set of high-risk sample scores sorted in descending order, w(x i ) is the weight of the sample, and desc is the descending order;
[0039] S36. Output the high-risk user behavior marks and the abnormal behavior risk scoring table.
[0040] Optionally, the S4 specifically includes:
[0041] S41. Receive the marked high-risk user behavior data, extract relevant behavior features, and construct a high-risk behavior feature set;
[0042] S42. Based on the constructed high-risk behavior feature set, use the simulation tool Locust to define a user behavior simulation script and generate a user behavior simulation scenario:
[0043]
[0044] where U(t) is the user behavior simulation scenario, n is the total number of operations in the user operation sequence, m is the total number of simulated users, δ j (t) indicates whether the jth user performs an operation at time t, a i is the ith operation in the user behavior, f i is the number of requests per second;
[0045] S43. According to the user behavior simulation scenario, dynamically adjust the test parameters in combination with the system performance indicators, including increasing the number of concurrent users, shortening the request interval, and increasing the complex operation sequence:
[0046]
[0047] where P is the comprehensive dynamic test parameter, N b is the initial number of concurrent users, R u is the triggering ratio of high-risk behaviors, S is the safety factor, T r is the average request interval time between users, m is the number of operation types in high-risk behaviors, W i is the weight of operation i, and L i is the execution length of operation i;
[0048] S44. Use the adjusted test parameters to perform a stress test through the simulation tool Locust, simulate the impact of high-risk user behaviors on the performance of the target application system in the actual operating environment, and record the performance indicators during the test in real time;
[0049] S45. Analyze the recorded performance metrics, including response time, throughput, CPU usage, and memory occupancy, verify the impact of high-risk behaviors on the stability of the target application system, and identify potential performance bottlenecks and anomalies;
[0050] S46. Output the stress test results, including the performance performance and stability evaluation data of the target application system under high-risk behaviors.
[0051] Optionally, the S5 specifically includes:
[0052] S51. Analyze the high-risk behaviors and module influence scopes by parsing the abnormal behavior risk scoring table, smooth the impact of abnormal behaviors on module interactions using logarithmic functions, combine the stress test results, calculate the non-linear influence intensity of performance changes, extract the module call frequency and data dependencies from the causal model as supplementary weights, and construct an initial causal relationship graph:
[0053]
[0054] Among them, W ij is the weight from module i to module j in the initial causal relationship graph, R ij is the interaction intensity of high-risk behaviors on modules i and j, α, β, and γ are the adjustment factors for abnormal behaviors, performance changes, and module dependencies respectively, P ij is the degree of influence of the performance change of module i on module j in the stress test results, D ij is the module call frequency or data dependency, and ln is the logarithmic function;
[0055] S52. Based on the generated initial causal relationship graph, initialize the parameters of the genetic algorithm, including population size, crossover probability, mutation probability, and maximum number of iterations, generate a population, and each individual represents a set of weight assignment schemes for the causal relationship graph;
[0056] S53. Using the generated population, define a fitness function, by combining the risk scores of abnormal behaviors and the stress test results, enhance the impact of high-risk behaviors and performance deterioration using power and exponential functions, and at the same time introduce a weight discreteness penalty mechanism to calculate the fitness value of each individual:
[0057]
[0058] Among them, F(G) is the fitness value of the individual, w 1 and w 2 are the weight coefficients in the fitness function, R s is the risk score of the abnormal behavior, β 1 is the exponent of the power function, P ris the performance impact score of the stress test, γ is the amplification coefficient of the exponential function, e is the exponential function, p is the number of edges in the causal relationship graph, and G k is the weight of the k-th edge in the individual G, and is the average value of all weights in the individual G;
[0059] S54. Based on the calculated individual fitness value, adopt the non-uniform crossover strategy, adjust the weight ratio of the parents with the iteration number through the dynamic adjustment factor, and combine the random number and the crossover probability to control the crossover trigger condition to form a new individual:
[0060]
[0061] where G' i is the weight value of the new individual on the i-th edge, G 1,i and G 2,i are the weight values of the parent individuals G 1 and G 2 on the i-th edge, α 0 is the initial adjustment factor, t is the current iteration number, T max is the maximum iteration number of the genetic algorithm, r is the random number, and p c is the threshold for triggering the crossover operation,
[0062] S55. Perform a mutation operation on the new individual, randomly adjust some weight values, further explore the solution space, and update the individual weight scheme in combination with the initial weight information;
[0063] S56. After reaching the predetermined iteration number or fitness threshold, select the individual with the highest fitness value as the final weight allocation scheme, and generate an optimized causal model in combination with the causal relationship graph.
[0064] Optionally, the S6 specifically includes:
[0065] S61. Analyze the module dependencies of the optimized causal model, combine the resource consumption and performance impact data of the stress test results, integrate the causal weights and dynamic indicators to generate a resource competition relationship matrix, where the matrix elements represent the resource competition intensity between modules, and perform data standardization processing:
[0066]
[0067] where M ij is the resource competition intensity of module i on module j in the resource competition relationship matrix, α, β, and γ are the adjustment coefficients of causal weight, resource consumption, and performance impact respectively, W ij is the causal dependence intensity of module i on module j, R i is the resource consumption of module i, and R totalThe sum of the resource consumption of all modules, P ij The influence intensity of the performance change of module i on module j;
[0068] S62. Based on the resource competition relationship matrix, use the Lotka-Volterra equation to establish the resource competition and cooperation relationship between modules, define the initial state variables of each module, including resource occupancy rate, growth rate, and mutual influence coefficient, and construct a module ecological model:
[0069]
[0070] Among them, N i is the resource occupancy of module i, N j is the resource occupancy of module j, r i is the growth rate of module i, r is the total number of modules, α ij is the influence coefficient of module j on module i, K i is the resource carrying capacity limit of module i, and t is time;
[0071] S63. Use the ecological model for numerical solution, simulate the dynamic change process of module resource competition and cooperation, generate the resource usage time series data of each module, and analyze the resource competition situation and change trend;
[0072] S64. According to the resource usage time series data, calculate the health index of each module by evaluating the resource competition ability, operation stability, and impact on system performance of the module:
[0073]
[0074] Among them, H i is the health index of module i, S i is the stability score of module i, R i is the performance contribution of module i, W s ,W r is the weight of stability and performance contribution;
[0075] S65. Combine the module health index and resource consumption data to dynamically optimize the resource allocation strategy between modules and balance the competition and cooperation between modules;
[0076] S66. Output resource allocation suggestions, including the resource allocation ratio, optimization goal, and priority of each module.
[0077] Optionally, the specific content of S7 includes:
[0078] S71. Receive the module health index and the resource allocation suggestions between modules, extract the stability and fairness goals, as well as the current resource allocation status and constraint conditions, and construct a multi-objective problem model;
[0079] S72. Initialize the NSGA-II multi-objective optimization algorithm based on the constructed multi-objective problem model, set the population size, crossover probability, mutation probability, and maximum number of iterations, generate a population, and each individual represents a resource allocation scheme.
[0080] S73. Evaluate each individual in the population using a dynamic fitness function, calculate the fitness value of the resource allocation scheme by combining the stability and fairness objectives, and perform non-dominated sorting on the individuals:
[0081]
[0082] Among them, F(A) is the fitness value of the resource allocation scheme, A is the amount of resources allocated to each module, t is the optimization process, T max is the termination condition of the optimization, m is the total number of modules in the system, W i is the weight of module i, A i is the amount of resources allocated to module i in the resource allocation scheme, R i is the resource requirement of module i, is the dispersion degree of resource allocation;
[0083] S74. According to the non-dominated sorting result, select high-quality individuals from the population as parents, perform crossover operations to generate new resource allocation schemes, and integrate the characteristics of the parent schemes into the next-generation individuals to expand the solution space:
[0084]
[0085] Among them, A' i is the amount of resources allocated to the i-th module of the new individual, A 1,i and A 2,i are the resource allocation amounts of the parent individuals in the i-th module, η is the crossover adjustment factor, p c is the crossover probability, and r is a random number;
[0086] S75. Perform mutation operations on the generated new resource allocation schemes and randomly adjust the allocation ratio in combination with the resource allocation suggestions.
[0087] S76. After reaching the predetermined number of iterations or convergence conditions, select the optimal resource allocation scheme on the Pareto front from the generated population, and at the same time output the trade-off analysis of stability and fairness.
[0088] The beneficial effects of the present invention are:
[0089] The present invention proposes an innovative method for optimizing resource allocation strategies by combining dynamic ecological modeling and multi-objective optimization algorithms, effectively solving several key problems in the prior art. First, the present invention constructs the resource competition and cooperation relationships between modules through the Lotka-Volterra equation, accurately depicting the dynamic interactions between modules, thereby overcoming the defect that traditional correlation analysis methods cannot capture the complex dynamics of resource competition. The introduction of the module health index, combined with dynamically updated resource allocation suggestions, enables resource allocation to adapt to changes in resource requirements between modules in real time, significantly improving the stability and resource utilization efficiency of the system. Second, the present invention adopts the NSGA-II multi-objective optimization algorithm, taking stability and fairness as the core optimization objectives, dynamically adjusting the algorithm weights, and achieving the best balance between stability and fairness while taking into account the accuracy of resource allocation and system fairness. The introduction of dynamic weights enables the optimization process to be flexibly adjusted according to the system operation status to meet the requirements of different stages, thus solving the problem of the insufficient performance of traditional algorithms in multi-objective optimization.
[0090] In addition, in view of the current situation of uneven resource allocation and importance differences between modules, the present invention adjusts the resource allocation scheme by introducing health index weights to ensure the priority allocation of resources to key modules while improving the resource utilization efficiency of non-key modules. The improved fairness evaluation mechanism combines the variance of the allocation ratio and the Gini coefficient, comprehensively measuring the rationality and balance of resource allocation, and overcoming the limitation of single fairness evaluation in the prior art. Through the deep integration of dynamic ecological modeling and optimization algorithms, the present invention not only realizes the dynamic adaptive adjustment of resource allocation, but also provides a trade-off analysis between system stability and fairness, providing technical support for the efficient resource management of complex systems under high-load operation.
[0091] The comprehensive effect of the present invention is remarkable. It can effectively optimize resource allocation strategies in complex dynamic scenarios, improve the operation efficiency, stability and fairness of the system, and has broad application prospects and important technical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] The drawings are used to provide a further understanding of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention and do not constitute a limitation to the present invention. In the drawings:
[0093] Figure 1 is a flowchart of a software stability evaluation system for software development proposed by the present invention;
[0094] Figure 2 is a schematic structural diagram of the process of calculating the module health index and generating dynamic resource allocation suggestions for a software stability evaluation system for software development proposed by the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0095] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are all simplified schematic diagrams, only illustrating the basic structure of the present invention in a schematic manner, so they only show the components related to the present invention.
[0096] Reference Figure 1-2 , a software stability evaluation system for software development, comprising:
[0097] A data collection and preprocessing module for collecting user behavior data and system performance metrics;
[0098] A user behavior modeling module for modeling user behavior data based on a psychological model;
[0099] An abnormal behavior detection module for detecting abnormal user behaviors and evaluating the potential impact on system stability;
[0100] A stress test generation and execution module for generating simulation data and executing stress tests;
[0101] A causal relationship optimization module for optimizing the edge weights of a causal relationship graph through a genetic algorithm;
[0102] A module ecosystem modeling and analysis module for establishing a resource competition and collaboration model between modules;
[0103] A multi-objective optimization module for optimizing the resource allocation strategy based on the module health index and balance requirements;
[0104] An interpretability and decision-making module for analyzing the decision-making process of the evaluation model and generating a decision report.
[0105] In this embodiment, the modules are implemented through the following methods:
[0106] S1. Collect user behavior data, clean and standardize the data for preprocessing, extract key features, and generate a user behavior data set;
[0107] S2. Based on the user behavior data set, model through the deep learning model Transformer, extract sequence features, and generate user behavior feature vectors;
[0108] S3. Based on the user behavior feature vectors, apply the Isolation Forest algorithm to detect abnormal behaviors, output an abnormal behavior risk score table, and mark high-risk user behaviors;
[0109] S4. According to the marked high-risk user behaviors, use the simulation tool Locust to generate simulation data of user behaviors, dynamically adjust the test parameters, verify the impact of high-risk behaviors on the stability of the target application system through stress tests, and output the stress test results;
[0110] S5. Combine the risk scoring table of abnormal behaviors and the stress test results, and use the genetic algorithm to optimize the weights of the causal relationship graph to generate an optimized causal model;
[0111] S6. Utilize the optimized causal model and the stress test results to establish an ecological model of resource competition based on the Lotka-Volterra equation, calculate the module health index, and dynamically update the resource allocation suggestions among modules;
[0112] S7. Based on the module health index and the resource allocation suggestions among modules, use the NSGA-II multi-objective optimization algorithm to generate a resource allocation strategy that takes into account both stability and fairness, and output the optimal resource allocation plan;
[0113] S8. For the generated optimal resource allocation plan, analyze the key influencing factors of the resource allocation decision, extract the decision logic, and generate a decision report.
[0114] In this embodiment, the specific steps of S3 include:
[0115] S31. Receive the user behavior feature vector as input and organize it into a feature matrix, where each row is a sample and each column is the corresponding feature dimension, to generate a data set;
[0116] S32. Based on the data set, initialize the Isolation Forest algorithm, set the sub-sample size, the number of decision trees, and the splitting strategy, and construct a model structure for splitting the user behavior feature space;
[0117] S33. Use the initialized Isolation Forest algorithm to train the data set, and generate a decision tree model by recursively and randomly splitting the sample space to learn the normal distribution pattern of user behaviors;
[0118] S34. Input the user behavior feature vector into the trained Isolation Forest model, and calculate the anomaly score of each sample according to the statistical result of the path length of the sample in the decision tree:
[0119]
[0120] where S(x) is the anomaly score of sample x, t is the number of decision trees, h j (x) is the path length of sample x in the j-th decision tree, H(n - 10 is the harmonic number of the (n - 1)-th term, and n is the total number of samples;
[0121] S35. Dynamically adjust the risk scoring threshold based on the generated anomaly scores, screen the samples above the threshold, mark them as high-risk user behaviors, and sort the high-risk samples by combining the anomaly scores and weight priorities:
[0122]
[0123] S sorted = Sort({s(x i )·w(x i ) | Risk(x i ) = 1}, desc);
[0124] Among them, Risk(x i ) is the risk mark of the sample, s(x i ) is the anomaly score of the sample, μ s is the mean of the anomaly scores, σ s is the standard deviation of the anomaly scores, k is the adjustment factor of the risk threshold, λ is the weight of the dynamic adjustment factor, f(x i ) is the specific attribute function of the sample, S sorted is the set of high-risk sample scores sorted in descending order, w(x i ) is the weight of the sample, desc is the descending order;
[0125] S36. Output the high-risk user behavior marks and the anomaly behavior risk scoring table.
[0126] In this embodiment, the S4 specifically includes:
[0127] S41. Receive the marked high-risk user behavior data, extract relevant behavior characteristics, and construct a high-risk behavior characteristic set;
[0128] S42. Based on the constructed high-risk behavior characteristic set, use the simulation tool Locust to define a user behavior simulation script and generate a user behavior simulation scenario:
[0129]
[0130] Among them, U(t) is the user behavior simulation scenario, n is the total number of operations in the user operation sequence, m is the total number of simulated users, δ j (t) is whether the jth user performs an operation at time t, a i is the ith operation in the user behavior, f i is the number of requests per second;
[0131] S43. According to the user behavior simulation scenario, dynamically adjust the test parameters in combination with the system performance indicators, including increasing the number of concurrent users, shortening the request interval, and increasing the complex operation sequence:
[0132]
[0133] Among them, P is the comprehensive dynamic test parameter, N b is the initial number of concurrent users, R u is the trigger ratio of high-risk behaviors, S is the safety factor, T r is the average request interval time between users, m is the number of operation types in high-risk behaviors, W i is the weight of operation i, L i is the execution length of operation i;
[0134] S44. Use the adjusted test parameters to perform a stress test through the simulation tool Locust, simulate the impact of high-risk user behaviors on the performance of the target application system in the actual operating environment, and record the performance metrics during the test in real time;
[0135] S45. Analyze the recorded performance metrics, including response time, throughput, CPU usage, and memory occupancy, verify the impact of high-risk behaviors on the stability of the target application system, and identify potential performance bottlenecks and anomalies;
[0136] S46. Output the stress test results, including the performance performance and stability evaluation data of the target application system under high-risk behaviors.
[0137] In this embodiment, the S5 specifically includes:
[0138] S51. Analyze the high-risk behaviors and the module influence scope by parsing the abnormal behavior risk scoring table, use the logarithmic function to smooth the impact of abnormal behaviors on module interactions, combine the stress test results, calculate the non-linear influence intensity of performance changes, extract the module call frequency and data dependency from the causal model as supplementary weights, and construct an initial causal relationship diagram:
[0139]
[0140] Among them, W ij is the weight from module i to module j in the initial causal relationship diagram, R ij is the interaction intensity of high-risk behaviors on modules i and j, α, β, γ are the adjustment factors of abnormal behaviors, performance changes, and module dependencies respectively, P ij is the impact degree of the performance change of module i on module j in the stress test results, D ij is the module call frequency or data dependency, and ln is the logarithmic function;
[0141] S52. Initialize the parameters of the genetic algorithm based on the generated initial causal relationship diagram, including population size, crossover probability, mutation probability, and maximum number of iterations, and generate a population. Each individual represents a set of weight assignment schemes for the causal relationship diagram.
[0142] S53. Using the generated population, define a fitness function. By combining the risk score of abnormal behavior and the stress test results, adopt power and exponential functions to enhance the impact of high-risk behaviors and performance deterioration, and at the same time introduce a weight discreteness penalty mechanism to calculate the fitness value of each individual:
[0143]
[0144] Among them, F(G) is the fitness value of the individual, w 1 and w 2 are the weight coefficients in the fitness function, R s is the risk score of abnormal behavior, β 1 is the exponent of the power function, P r is the performance impact score of the stress test, γ is the amplification coefficient of the exponential function, e is the exponential function, p is the number of edges in the causal relationship diagram, G k is the weight of the k-th edge in the individual G, is the average value of all weights in the individual G;
[0145] S54. Based on the calculated individual fitness values, adopt a non-uniform crossover strategy. Adjust the weight ratio of the parents with the iteration number through a dynamic adjustment factor, and combine a random number and the crossover probability to control the crossover trigger condition to form new individuals:
[0146]
[0147] Among them, G' i is the weight value of the new individual on the i-th edge, G 1,i and G 2,i are the weight values of the parent individuals G 1 and G 2 on the i-th edge, α 0 is the initial adjustment factor, t is the current iteration number, T max is the maximum number of iterations of the genetic algorithm, r is a random number, p c is the threshold for triggering the crossover operation,
[0148] S55. Perform a mutation operation on the new individual, randomly adjust some weight values, further explore the solution space, and at the same time update the individual weight scheme in combination with the initial weight information;
[0149] S56. After reaching the predetermined number of iterations or fitness threshold, select the individual with the highest fitness value as the final weight allocation scheme, and combine it with the causal relationship diagram to generate an optimized causal model.
[0150] In this embodiment, the S6 specifically includes:
[0151] S61. Analyze the module dependency relationships of the optimized causal model, combine the resource consumption and performance impact data of the stress test results, integrate the causal weights and dynamic indicators to generate a resource competition relationship matrix, where the matrix elements represent the resource competition intensity between modules, and perform data standardization processing:
[0152]
[0153] Among them, M ij is the resource competition intensity of module i on module j in the resource competition relationship matrix, α, β, γ are the adjustment coefficients of causal weight, resource consumption, and performance impact respectively, W ij is the causal dependence intensity of module i on module j, R i is the resource consumption of module i, R total is the total resource consumption of all modules, P ij is the influence intensity of the performance change of module i on module j;
[0154] S62. Based on the resource competition relationship matrix, use the Lotka-Volterra equation to establish the resource competition and cooperation relationships between modules, define the initial state variables of each module, including resource occupancy rate, growth rate, and mutual influence coefficient, and construct a module ecological model:
[0155]
[0156] Among them, N i is the resource occupancy of module i, N j is the resource occupancy of module j, r i is the growth rate of module i, r is the total number of modules, α ij is the influence coefficient of module j on module i, K i is the resource carrying capacity limit of module i, and t is time;
[0157] S63. Use the ecological model for numerical solution, simulate the dynamic change process of module resource competition and cooperation, generate the resource usage time series data of each module, and analyze the resource competition situation and change trend;
[0158] S64. According to the resource usage time series data, calculate the health index of each module by evaluating the resource competition ability, operation stability, and impact on system performance of the module:
[0159]
[0160] Among them, H i is the health index of module i, S i is the stability score of module i, R i is the performance contribution of module i, W s , W r is the weight of stability and performance contribution;
[0161] S65. Combine the module health index and resource consumption data to dynamically optimize the resource allocation strategy among modules, and balance the competition and cooperation among modules;
[0162] S66. Output resource allocation suggestions, including the resource allocation ratio, optimization objectives, and priorities of each module.
[0163] In this embodiment, the specific steps of S7 are as follows:
[0164] S71. Receive the module health index and resource allocation suggestions among modules, extract the stability and fairness objectives, as well as the current resource allocation status and constraints, and construct a multi-objective problem model;
[0165] S72. Based on the constructed multi-objective problem model, initialize the NSGA-II multi-objective optimization algorithm, set the population size, crossover probability, mutation probability, and maximum number of iterations, generate a population, and each individual represents a resource allocation scheme;
[0166] S73. Evaluate each individual in the population using a dynamic fitness function, calculate the fitness value of the resource allocation scheme in combination with the stability and fairness objectives, and perform non-dominated sorting on the individuals:
[0167]
[0168] Among them, F(A) is the fitness value of the resource allocation scheme, A is the amount of resources allocated to each module, t is the optimization process, T max is the termination condition of optimization, m is the total number of modules in the system, W i is the weight of module i, A i is the amount of resources allocated to module i in the resource allocation scheme, R i is the resource demand of module i, is the dispersion degree of resource allocation;
[0169] S74. According to the non-dominated sorting result, select high-quality individuals from the population as parents, perform crossover operations to generate new resource allocation schemes, and integrate the characteristics of the parent schemes into the next-generation individuals to expand the solution space:
[0170]
[0171] Among them, A' i is the resource allocation amount of the new individual in the i-th module, A 1,i and A 2,i are the resource allocation amounts of the parental individuals in the i-th module, η is the crossover adjustment factor, p c is the crossover probability, and r is a random number;
[0172] S75. Perform a mutation operation on the generated new resource allocation scheme, and randomly adjust the allocation ratio in combination with the resource allocation suggestions;
[0173] S76. After reaching the predetermined number of iterations or convergence conditions, select the optimal resource allocation scheme on the Pareto front from the generated population, and at the same time output the trade-off analysis of stability and fairness.
[0174] Example 1:
[0175] To verify the feasibility of the present invention in implementation, the present invention is applied to a certain large e-commerce platform. The system consists of multiple core modules, including a user management module, a commodity display module, an order processing module, a payment module, and a logistics management module. Due to the different importance and resource requirements of each module, uneven resource allocation may lead to performance bottlenecks in some key modules, thereby causing a decline in the overall system performance or even service interruption. In addition, resource allocation with insufficient fairness may lead to resource waste or resource shortage problems in some modules, affecting the user experience and system stability. Existing static resource allocation strategies are difficult to meet the requirements in such high-dynamic and high-load scenarios.
[0176] To solve the above problems, the present invention adopts a resource allocation strategy optimization method combining dynamic ecological modeling and multi-objective optimization. First, through stress testing and abnormal behavior analysis, obtain the resource consumption patterns and performance indicators of each module under peak traffic. Then, based on the Lotka-Volterra equation, construct an ecological model of resource competition between modules, simulate the dynamic interaction between modules, and calculate the health index of each module. The health index comprehensively considers the stability, resource competition ability, and contribution to the overall system performance of the module. On this basis, in combination with dynamic resource allocation suggestions, use the NSGA-II multi-objective optimization algorithm to generate a resource allocation strategy that takes into account both stability and fairness.
[0177] In practical applications, by monitoring users' access to data, it is found that the resource demand ratios of the order processing module and the payment module during peak periods are as high as over 50%, while the resource demand of the logistics management module fluctuates less. The calculation result of the health index shows that the health index of the order processing module is only 0.6, lower than 0.8 of the payment module, indicating that the order processing module is the most vulnerable part of the system and requires priority resource allocation. At the same time, after multi-objective optimization through the NSGA-II algorithm, the generated resource allocation strategy not only ensures the stability of resources for key modules but also significantly improves the resource utilization rate of non-key modules.
[0178] Table 1 Comparison table of resource allocation before and after optimization for each module
[0179]
[0180] Table 2 Comparison table of system performance indicators before and after optimization
[0181] Performance indicators Before optimization After optimization System transaction failure rate 10% 3% Average user response time 1.8 seconds 1.1 seconds Resource utilization rate 65% 85% Stability score 80 points 93 points Fairness variance 0.12 0.04 Gini coefficient 0.35 0.18
[0182] As can be seen from Table 1, the optimized resource allocation significantly increases the resource occupancy ratio of key modules. For example, the resource allocation of the order processing module increases from 15% to 30%, and the health index increases from 0.6 to 0.85, significantly enhancing stability. The resource allocation of the payment module increases from 20% to 25%, and the health index increases from 0.8 to 0.9. For non-key modules such as the logistics management module, the resource allocation is reasonably reduced, and the health index still increases, making resource utilization more efficient.
[0183] As can be seen from Table 2, after optimization, the transaction failure rate drops from 10% to 3%, the average response time shortens from 1.8 seconds to 1.1 seconds, and the resource utilization rate increases from 65% to 85%. In addition, the allocation fairness is significantly improved, the allocation variance drops from 0.12 to 0.04, the Gini coefficient drops from 0.35 to 0.18, and the overall system stability score increases from 80 points to 93 points.
[0184] In summary, through the comprehensive application of dynamic ecological modeling and multi-objective optimization algorithms, the present invention significantly improves the rationality, stability, and fairness of system resource allocation. The optimized strategy can effectively relieve the resource pressure of key modules in high-dynamic scenarios, while improving the overall resource utilization rate, reducing the operation risks and performance bottlenecks of the system. This optimization strategy provides strong technical support for resource management in complex scenarios and has high practical application value.
[0185] The above are only the preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, making equivalent substitutions or changes should be covered within the protection scope of the present invention.
Claims
1. A software stability evaluation system for software development, characterized in that: include: Data collection and preprocessing module, used to collect user behavior data and system performance indicators; User behavior modeling module, used to model user behavior data based on psychological models; Abnormal behavior detection module, used to detect abnormal user behavior and assess the potential impact on system stability; Stress test generation and execution module, used to generate simulation data and execute stress tests; The causality optimization module is used to optimize the edge weights of the causality graph through genetic algorithms; Module ecological modeling and analysis module, used to establish resource competition and cooperation models among modules; Multi-objective optimization module, used to optimize resource allocation strategy based on module health index and balance requirements; The explainability and decision module is used to analyze the decision process of the evaluation model and generate a decision report.
2. A software stability evaluation system for software development according to claim 1, characterized in that: The modules are implemented in the following ways: S1. Collect user behavior data, clean and standardize the data, extract key features and generate user behavior data sets; S2. Based on the user behavior dataset, modeling is performed through the deep learning model Transformer to extract sequence features and generate user behavior feature vectors; S3. Based on the user behavior feature vector, the Isolation Forest algorithm is used to detect abnormal behaviors, output an abnormal behavior risk score table, and mark high-risk user behaviors; S4. Based on the marked high-risk user behaviors, the simulation tool Locust is used to generate simulated data of user behaviors, dynamically adjust the test parameters, verify the impact of high-risk behaviors on the stability of the target application system through stress testing, and output the stress test results; S5. Combine the risk score table of abnormal behavior and the stress test results, use genetic algorithm to optimize the weight of the causal relationship graph and generate an optimized causal model; S6. Using the optimized causal model and stress test results, an ecological model of resource competition is established based on the Lotka-Volterra equation to calculate the module health index and dynamically update the resource allocation suggestions between modules; S7. Based on the module health index and the resource allocation suggestions between modules, the NSGA-II multi-objective optimization algorithm is used to generate a resource allocation strategy that takes both stability and fairness into consideration, and output the optimal resource allocation solution; S8. For the generated optimal resource allocation plan, analyze the key influencing factors of resource allocation decision, extract the decision logic and generate a decision report.
3. A software stability evaluation system for software development according to claim 2, characterized in that: The S3 comprises the following specific steps: S31, receiving a user behavior feature vector as input, organizing it into a feature matrix, where each row is a sample and each column is a corresponding feature dimension, and generating a data set; S32. Based on the data set, initialize the Isolation Forest algorithm, set the subsample size, number of decision trees and segmentation strategy, and build a model structure for segmenting the user behavior feature space; S33, using the initialized Isolation Forest algorithm to train the data set, generate a decision tree model by recursively and randomly splitting the sample space, and learn the normal distribution pattern of user behavior; S34. Input the user behavior feature vector into the trained Isolation Forest model, and calculate the abnormal score of each sample based on the statistical results of the sample's path length in the decision tree: Among them, S(x) is the anomaly score of sample x, t is the number of decision trees, and h j (x) is the path length of sample x in the jth decision tree, H(n-1) is the harmonic number of the n-1th item, and n is the total number of samples; S35. Based on the generated anomaly score, dynamically adjust the risk score threshold, filter samples above the threshold, mark them as high-risk user behaviors, and sort the high-risk samples based on the anomaly score and weight priority: S sorted =Sort({s(x i )·w(x i )∣Risk(x i )=1},desc); Among them, Risk(x i ) is the risk marker of the sample, s(x i ) is the abnormal score of the sample, μ s is the mean of the anomaly scores, σ s is the standard deviation of the anomaly score, k is the adjustment factor of the risk threshold, λ is the weight of the dynamic adjustment factor, f(x i ) is the specific attribute function of the sample, S sorted is a set of high-risk sample scores arranged in descending order, w(x i ) is the weight of the sample, and desc is descending order; S36. Output high-risk user behavior tags and abnormal behavior risk score table.
4. A software stability evaluation system for software development according to claim 2, characterized in that: The S4 comprises the following specific steps: S41, receiving marked high-risk user behavior data, extracting relevant behavior features, and constructing a high-risk behavior feature set; S42. Based on the constructed high-risk behavior feature set, the simulation tool Locust is used to define the user behavior simulation script and generate the user behavior simulation scenario: Among them, U(t) is the user behavior simulation scenario, n is the total number of operations in the user operation sequence, m is the total number of simulated users, and δ j (t) is whether the jth user performs an operation at time t, a i is the i-th operation in the user behavior, f i is the number of requests per second; S43. According to the user behavior simulation scenario, dynamically adjust the test parameters in combination with the system performance indicators, including increasing the number of concurrent users, shortening the request interval, and increasing the complex operation sequence: Among them, P is the comprehensive dynamic test parameter, N b is the initial number of concurrent users, R u is the trigger ratio of high-risk behavior, S is the safety factor, T r is the average request interval between users, m is the number of operation types in high-risk behaviors, and W i is the weight of operation i, L i is the execution length of operation i; S44. Using the adjusted test parameters, perform stress testing through the simulation tool Locust to simulate the impact of high-risk user behavior on the performance of the target application system in the actual operating environment, and record the performance indicators during the test in real time; S45. Analyze the recorded performance indicators, including response time, throughput, CPU usage, and memory usage, verify the impact of high-risk behaviors on the stability of the target application system, and identify potential performance bottlenecks and anomalies; S46. Output stress test results, including performance and stability assessment data of the target application system under high-risk behaviors.
5. A software stability evaluation system for software development according to claim 2, characterized in that: The S5 comprises the following specific steps: S51. Analyze the abnormal behavior risk score table to extract high-risk behaviors and module impact ranges, use logarithmic functions to smooth the impact of abnormal behaviors on module interactions, combine stress test results, calculate the nonlinear impact intensity of performance changes, extract module call frequency and data dependency from the causal model as supplementary weights, and construct an initial causal relationship diagram: Among them, W ij is the weight from module i to module j in the initial causal relationship graph, R ij is the interaction strength of high-risk behavior on module i and module j, α, β, and γ are the adjustment factors of abnormal behavior, performance change, and module dependency, respectively, and P ij is the impact of the performance change of module i on module j in the stress test results, D ij is the calling frequency or data dependency between modules, and ln is the logarithmic function; S52, based on the generated initial causal relationship graph, initializing the parameters of the genetic algorithm, including population size, crossover probability, mutation probability and maximum number of iterations, generating a population, each individual representing a set of weight distribution schemes of the causal relationship graph; S53. Using the generated population, define the fitness function. By combining the risk score of abnormal behavior and the stress test results, use power and exponential functions to enhance the impact of high-risk behavior and performance deterioration. At the same time, introduce a weighted discrete penalty mechanism to calculate the fitness value of each individual: Among them, F(G) is the fitness value of the individual, w1 and w2 are the weight coefficients in the fitness function, and R s is the risk score of abnormal behavior, β1 is the exponent of the power function, P r is the performance impact score of the stress test, γ is the amplification factor of the exponential function, e is the exponential function, p is the number of edges in the causal relationship graph, G k is the weight of the kth edge in individual G, is the average value of all weights in individual G; S54, based on the calculated individual fitness value, adopts a non-uniform crossover strategy, adjusts the parent weight ratio with the number of iterations through a dynamic adjustment factor, combines random numbers and crossover probability to control the crossover trigger conditions, and forms a new individual: Among them, G' i is the weight of the new individual on the i-th edge, G 1,i and G 2,i is the weight value of parent individuals G1 and G2 on the i-th edge, α0 is the initial adjustment factor, t is the current number of iterations, T max is the maximum number of iterations of the genetic algorithm, r is a random number, p c is the threshold that triggers the crossover operation, S55, performing mutation operation on the new individual, randomly adjusting some weight values, further exploring the solution space, and updating the individual weight scheme in combination with the initial weight information; S56. After reaching a predetermined number of iterations or fitness threshold, select the individual with the highest fitness value as the final weight distribution scheme, and generate an optimized causal model in combination with the causal relationship diagram.
6. A software stability evaluation system for software development according to claim 2, characterized in that: The S6 comprises the following specific steps: S61. Analyze the optimized causal model to extract module dependencies, combine the resource consumption and performance impact data of the stress test results, integrate the causal weights and dynamic indicators to generate a resource competition relationship matrix. The matrix elements represent the resource competition intensity between modules, and standardize the data: Among them, M ij is the resource competition intensity of module i to module j in the resource competition relationship matrix, α, β, γ are the adjustment coefficients of causal weight, resource consumption and performance impact respectively, and W ij is the causal dependency strength of module i on module j, R i is the resource consumption of module i, R total is the sum of resource consumption of all modules, P ij is the impact strength of the performance change of module i on module j; S62. Based on the resource competition relationship matrix, the Lotka-Volterra equation is used to establish the resource competition and cooperation relationship between modules, define the initial state variables of each module, including resource occupancy rate, growth rate and mutual influence coefficient, and construct a module ecological model: Among them, N i is the resource usage of module i, N j is the resource usage of module j, r i is the growth rate of module i, r is the total number of modules, α ij is the influence coefficient of module j on module i, K i is the resource carrying limit of module i, and t is the time; S63. Use the ecological model to perform numerical solutions, simulate the dynamic changes of module resource competition and collaboration, generate resource usage time series data for each module, and analyze resource competition situation and change trend; S64. Calculate the health index of each module based on the resource usage time series data, and evaluate the module's resource competitiveness, operating stability, and impact on system performance: Among them, H i is the health index of module i, S i is the stability score of module i, R i is the performance contribution of module i, W s ,W r Weights contributed to stability and performance; S65. Combine the module health index and resource consumption data to dynamically optimize the resource allocation strategy between modules and balance the competition and collaboration between modules; S66. Output resource allocation suggestions, including resource allocation ratio, optimization goals and priorities for each module.
7. A software stability evaluation system for software development according to claim 2, characterized in that: The S7 comprises the following specific steps: S71, receiving the module health index and the resource allocation suggestions between modules, extracting the stability and fairness goals, as well as the current resource allocation status and constraints, and constructing a multi-objective problem model; S72. Based on the constructed multi-objective problem model, initialize the NSGA-II multi-objective optimization algorithm, set the population size, crossover probability, mutation probability and maximum number of iterations, generate a population, and each individual represents a resource allocation plan; S73. Use the dynamic fitness function to evaluate each individual in the population, calculate the fitness value of the resource allocation scheme in combination with the stability and fairness goals, and perform non-dominated sorting on the individuals: Among them, F(A) is the fitness value of the resource allocation scheme, A is the amount of resources allocated to each module, t is the optimization process, T max is the optimization termination condition, m is the total number of modules in the system, W i is the weight of module i, A i is the amount of resources allocated to module i in the resource allocation scheme, R i is the resource requirement of module i, the degree of discreteness with which resources are allocated; S74. According to the non-dominated sorting results, select high-quality individuals from the population as parents, use crossover operation to generate a new resource allocation plan, integrate the characteristics of the parent plan into the next generation of individuals, and expand the solution space: Among them, A' i is the amount of resources allocated to the new individual in the i-th module, A 1,i and A 2,i is the resource allocation of the parent individual in the i-th module, η is the cross adjustment factor, p c is the crossover probability, r is a random number; S75, performing a mutation operation on the generated new resource allocation scheme, and randomly adjusting the allocation ratio in combination with the resource allocation suggestion; S76. After reaching the predetermined number of iterations or convergence conditions, the optimal resource allocation scheme on the Pareto front is selected from the generated population, and a trade-off analysis between stability and fairness is output at the same time.
Citation Information
Cited By
Method and device for determining equipment maintenance data based on digital twin model
CN120430785A
A device maintenance data determination method and device based on a digital twin model
CN120430785B
Method and system for testing database server
CN121387743A
