Network security performance test load intelligent scheduling optimization method and system

By generating resource consumption curves, establishing resource conflict matrices, and optimizing test case execution timing using staggered distribution and simulated annealing algorithms, the performance bottleneck problem caused by resource contention in network security testing was solved, achieving efficient and reliable test result output.

CN121037255BActive Publication Date: 2026-01-23NO 15 INST OF CHINA ELECTRONICS TECH GRP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511565330.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-01-23
Estimated Expiration
2045-10-30

AI Technical Summary

Technical Problem

Existing network security testing methods lack accurate analysis of the resource consumption characteristics of test cases and comprehensive scheduling optimization of resource contention under high load, resulting in excessive resource concentration, performance bottlenecks, and inaccurate test results, making it difficult to dynamically respond to changes in system resources.

Method used

By acquiring resource consumption data from test cases, generating resource consumption curves, calculating resource feature vectors, establishing resource conflict matrices, identifying concurrency thresholds, and employing staggered distribution strategies and simulated annealing algorithms to optimize test case execution timing, the system resource bottlenecks are dynamically predicted, and execution timing is adjusted to optimize test load.

Benefits of technology

It improves the resource utilization and efficiency of the testing environment, eliminates test result fluctuations caused by resource contention, reduces the risk of system crashes, and significantly improves test coverage and the stability and reliability of results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121037255B_ABST
    Figure CN121037255B_ABST
Patent Text Reader

Abstract

The application provides a network security performance test load intelligent scheduling optimization method and system, relates to the field of network security testing, and comprises the following steps: generating a resource feature vector by acquiring resource consumption data of test cases, calculating resource competition relations among the test cases, establishing a resource conflict matrix and determining a resource concurrency threshold, calculating an execution interval of a high-competition test case, optimizing an execution time sequence by using a peak-shaving strategy, and dynamically predicting a system bottleneck point for pre-adjustment. The application can effectively avoid system resource conflicts, improve test resource utilization, and realize predictive optimization of test loads.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to network security testing technology, in particular to a network security performance test load intelligent scheduling optimization method and system. BACKGROUND

[0002] In the existing network security testing process, in order to ensure the stability and security of the system under high load, a large number of test cases need to be executed. However, with the increase of network size and application complexity, the number of test cases grows rapidly, and simply executing test cases in sequence or randomly will cause excessive concentration of system resources or conflicts, resulting in performance bottlenecks and affecting the accuracy of test results. The existing methods usually lack accurate analysis of the resource consumption characteristics of each test case and comprehensive scheduling optimization of the resource competition between test cases. This not only leads to uneven distribution of test load, but also may cause some key test cases to be delayed or failed due to resource contention, thereby affecting the overall test efficiency and the reliability of security evaluation. In addition, most of the existing test scheduling strategies rely on fixed rules or manual experience, and it is difficult to realize real-time response to dynamic changes of system resources, and lack of predictive processing ability for potential bottlenecks. Therefore, a method is needed to intelligently analyze the resource consumption characteristics of test cases, identify resource competition relationships and dynamically optimize the execution timing, in order to realize intelligent scheduling and efficient execution of network security performance test load. SUMMARY

[0003] The embodiments of the present application provide a network security performance test load intelligent scheduling optimization method and system, which can solve the problems in the prior art.

[0004] In a first aspect, the embodiments of the present application provide a network security performance test load intelligent scheduling optimization method, comprising:

[0005] Obtain network security test cases, collect resource consumption data of each test case, generate resource consumption curves, and calculate resource feature vectors of test cases according to resource consumption curves;

[0006] Based on the resource feature vectors, the resource competition relationships between test cases are calculated, the competition degree of test cases is measured by the overlap of peak consumption points, a resource conflict matrix of test cases is established, and the resource concurrency threshold of test cases is determined;

[0007] According to the resource conflict matrix and the resource concurrency threshold, the resource competition degree between test cases is identified, the minimum execution interval time of test cases with competition degree higher than the preset competition value is calculated, and the optimized test case execution timing is generated by using the peak-shifting distribution strategy;

[0008] The resource conflict matrix analysis is used to analyze the resource cumulative effect of the test cases in the execution time sequence, the system resource bottleneck point is dynamically predicted, and the execution time sequence of the test cases is adjusted in advance based on the prediction result, the predictive optimization of the test load is realized, and the test result is output.

[0009] In an optional embodiment,

[0010] The network security test cases are acquired, the resource consumption data of each test case is collected, the resource consumption curve is generated, and the resource feature vector of the test case is calculated according to the resource consumption curve, including:

[0011] The minimum execution time granularity of the network security test cases is acquired, the sampling period of the resource monitoring probe is set based on the minimum execution time granularity, the resource consumption data is collected in real time, and the original resource consumption data sequence containing the time sequence relationship is generated;

[0012] The numerical difference of adjacent sampling points in the original resource consumption data sequence is calculated, and denoising processing is performed to obtain the denoised resource consumption data sequence;

[0013] The denoised resource consumption data sequence is subjected to piecewise cubic spline interpolation, a continuous resource consumption curve is constructed based on the interpolation coefficients, the resource feature parameters of the network security test cases are calculated according to the resource consumption curve, and the resource feature parameters are organized into the resource feature vector of the network security test cases.

[0014] In an optional embodiment,

[0015] The resource competition relationship between the test cases is calculated based on the resource feature vector, the competition degree of the test cases is measured through the overlap of the peak consumption points, the resource conflict matrix of the test cases is established, and the resource concurrency threshold of the test cases is determined, including:

[0016] The execution time sequence of the test cases is analyzed based on the resource feature vector, the execution time interval of the test cases is extracted, the ratio of the time overlap interval length between the test cases to the total execution time length of the test cases is calculated, and the time overlap proportion is obtained;

[0017] In the time overlap interval, the resource feature vectors of the test cases are aligned, the ratio of the overlap amount of the resource consumption peak in the resource feature vector to the upper limit of the system resource is calculated, and the resource competition relationship is obtained;

[0018] The product of the resource competition relationship and the time overlap proportion is taken as the competition degree, the resource conflict matrix is constructed, the resource conflict matrix is subjected to eigenvalue decomposition, the competition mode is extracted based on the eigenvector, the competition intensity of the test cases in the competition mode is calculated, and the resource concurrency threshold of the test cases is determined in combination with the upper limit of the system resource capacity.

[0019] In an alternative embodiment,

[0020] According to the resource conflict matrix and the resource concurrency threshold, the resource competition degree between test cases is identified, and the minimum execution interval time of the test case with a competition degree higher than a preset competition value is calculated, and a staggered distribution strategy is used to generate an optimized test case execution time sequence, including:

[0021] Based on the resource conflict matrix and the resource concurrency threshold, a competition degree evaluation function is constructed, and the resource competition degree between test cases is calculated by combining the peak resource occupancy rate of the test cases using the competition degree evaluation function. The test cases with a resource competition degree exceeding a preset competition threshold are determined as the test cases to be scheduled, and a competition relationship matrix of the test cases in the test case group to be scheduled is established.

[0022] The resource superposition effect value is calculated for the test case group to be scheduled, and the minimum execution interval time that makes the resource superposition effect value lowest is determined by a bisection interval iteration method in combination with the resource concurrency threshold.

[0023] The test case group to be scheduled is constructed as a competition graph, a weighted connection edge is established in the competition graph based on the competition relationship matrix, and the minimum execution interval time is used as an edge weight constraint.

[0024] The execution time allocation scheme of the test cases is iteratively searched by a simulated annealing algorithm, the execution time of adjacent test cases is staggered and adjusted based on the edge weight constraint in each iteration, and the search temperature coefficient is dynamically adjusted until a staggered optimized test case execution time sequence is obtained.

[0025] In an alternative embodiment,

[0026] The execution time allocation scheme of the test cases is iteratively searched by a simulated annealing algorithm, the execution time of adjacent test cases is staggered and adjusted based on the edge weight constraint in each iteration, and the search temperature coefficient is dynamically adjusted until a staggered optimized test case execution time sequence is obtained, including:

[0027] The initial execution time sequence of the test case group to be scheduled is used as the initial solution of the state space, an optimization objective function based on the resource competition degree is constructed, and the initial value and the cooling coefficient of the temperature parameter are set;

[0028] According to the temperature parameter, iteratively search, randomly select a pair of test cases from the test case group to be scheduled, stagger and adjust the execution time of the pair of test cases according to the minimum execution interval time, and generate a candidate execution time sequence;

[0029] calculating a target value of the candidate execution timing according to the optimization objective function, accepting the candidate execution timing when the target value difference is negative, calculating an acceptance probability based on the temperature parameter and determining whether to accept the candidate execution timing when the target value difference is positive;

[0030] adjusting the temperature parameter based on the cooling coefficient, repeating the iteration until the temperature parameter is lower than a termination threshold, and outputting the execution timing with the optimal target value as the test case execution timing after peak-shifting optimization.

[0031] In an optional embodiment,

[0032] analyzing resource cumulative effects of the test cases in the execution timing by using the resource conflict matrix, dynamically predicting system resource bottleneck points, and pre-adjusting the execution timing of the test cases based on the prediction results to realize predictive optimization of test load and output test results including:

[0033] analyzing resource usage of the test cases in the current execution timing based on the resource conflict matrix, calculating resource overlap occupation degrees of adjacent test cases in a time window, and obtaining resource cumulative effect values in combination with resource consumption weights of the test cases;

[0034] dynamically sampling the resource cumulative effect values to obtain timing change characteristics, performing exponential smoothing operation on the timing change characteristics and the current resource cumulative effect values to obtain prediction results, adaptively adjusting a smoothing factor based on a deviation between the prediction results and actual values, and generating resource cumulative effect prediction values at future time points;

[0035] comparing the resource cumulative effect prediction values with system resource thresholds to dynamically identify resource bottleneck points, calculating cumulative influence weights of the test cases in the resource conflict matrix, and determining adjustment priority levels of the test cases according to the cumulative influence weights;

[0036] sorting the test cases based on the adjustment priority levels, determining adjustment steps of the execution timing in combination with a difference between a predicted time of the resource bottleneck points and a current time, pre-adjusting execution times of the test cases with priority levels higher than a preset priority threshold, and outputting the test case execution timing after predictive optimization.

[0037] In an optional embodiment,

[0038] comparing the resource cumulative effect prediction values with system resource thresholds to dynamically identify resource bottleneck points, and calculating cumulative influence weights of the test cases in the resource conflict matrix including:

[0039] mapping the resource cumulative effect prediction values into a resource pressure change curve, searching for an intersection position of the resource pressure change curve and the system resource threshold on the resource pressure change curve, and determining a time point corresponding to the intersection point as the resource bottleneck point;

[0040] At the resource bottleneck point, resource occupation data of each test case is extracted from the resource conflict matrix, and the resource occupation data is subjected to ratio operation with total resource pressure at the resource bottleneck point;

[0041] A cumulative influence weight of each test case is calculated based on the ratio operation result, and the cumulative influence weight represents a contribution degree of the test case to the resource bottleneck point.

[0042] A second aspect of the embodiment of the application provides a network security performance test load intelligent scheduling optimization system, comprising:

[0043] A first unit is configured to acquire network security test cases, collect resource consumption data of each test case, generate a resource consumption curve, and calculate a resource feature vector of the test case according to the resource consumption curve;

[0044] A second unit is configured to calculate a resource competition relationship between test cases based on the resource feature vector, measure a competition degree of the test cases through overlapping of peak consumption points, establish a resource conflict matrix of the test cases, and determine a resource concurrency threshold of the test cases;

[0045] A third unit is configured to identify a resource competition degree between test cases according to the resource conflict matrix and the resource concurrency threshold, calculate a minimum execution interval duration of a test case whose competition degree is higher than a preset competition value, and generate an optimized test case execution time sequence by using a staggered distribution strategy;

[0046] A fourth unit is configured to analyze a resource cumulative effect of the test cases in the execution time sequence by using the resource conflict matrix, dynamically predict a system resource bottleneck point, and pre-adjust the execution time sequence of the test cases based on a prediction result, so as to realize predictive optimization of test load and output a test result.

[0047] A third aspect of the embodiment of the application provides an electronic device, comprising:

[0048] A processor;

[0049] A memory for storing processor-executable instructions;

[0050] The processor is configured to invoke instructions stored in the memory to execute the method described above.

[0051] A fourth aspect of the embodiment of the application provides a computer-readable storage medium having computer program instructions stored thereon, and the computer program instructions are executed by a processor to implement the method described above.

[0052] In the embodiment, the resource characteristics of the test cases are analyzed through the resource consumption curve, the resource competition relationship between the test cases is accurately identified, the performance bottleneck problem caused by the resource conflict in the traditional test method is effectively avoided, and the resource utilization rate and the test efficiency of the test environment are improved. The optimized test case execution time sequence is generated by adopting the staggered distribution strategy, the minimum execution interval is calculated according to the resource competition degree, the simultaneous execution of the test cases with high resource consumption is avoided, the test result fluctuation caused by the resource competition is eliminated, and the stability and reliability of the test result are improved. The system resource bottleneck point is dynamically predicted and pre-adjusted, the predictability optimization of the test load is realized, the risk of system crash in the test process is reduced, and the test coverage is significantly improved, so that a more accurate and efficient test scheme is provided for the network security test. BRIEF DESCRIPTION OF DRAWINGS

[0053] Figure 1 A flowchart of the network security performance test load intelligent scheduling optimization method of the embodiment of the present application is shown in

[0054] Figure 2 A test case execution time sequence optimization flowchart based on the resource conflict matrix of the embodiment of the present application is shown in DETAILED DESCRIPTION

[0055] To make the purpose, technical scheme and advantages of the embodiment of the present application clearer, the technical scheme in the embodiment of the present application will be described clearly and completely in combination with the drawings in the embodiment of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor belong to the scope of protection of the present application.

[0056] The technical scheme of the present application will be described in detail in specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in some embodiments.

[0057] Figure 1 A flowchart of the network security performance test load intelligent scheduling optimization method of the embodiment of the present application is shown in Figure 1 As shown in the figure, the method comprises:

[0058] The network security test cases are acquired, the resource consumption data of each test case is collected, the resource consumption curve is generated, and the resource characteristic vector of the test case is calculated according to the resource consumption curve;

[0059] The resource competition relationship between the test cases is calculated based on the resource characteristic vector, the competition degree of the test cases is measured through the overlap of the peak consumption point, the resource conflict matrix of the test cases is established, and the resource concurrency threshold of the test cases is determined.

[0060] According to the resource conflict matrix and the resource concurrency threshold, the resource competition degree between test cases is identified, the minimum execution interval of the test case with the competition degree higher than the preset competition value is calculated, and the optimized test case execution time sequence is generated by using the staggered distribution strategy;

[0061] The resource cumulative effect of the test case in the execution time sequence is analyzed by using the resource conflict matrix, the system resource bottleneck point is dynamically predicted, and the execution time sequence of the test case is adjusted in advance based on the prediction result, so that the predictability optimization of the test load is realized and the test result is output.

[0062] In an optional embodiment, network security test cases are acquired, resource consumption data of each test case is collected, a resource consumption curve is generated, and a resource feature vector of the test case is calculated according to the resource consumption curve, including:

[0063] The minimum execution time granularity of the network security test case is acquired, and the sampling period of the resource monitoring probe is set based on the minimum execution time granularity;

[0064] The resource consumption data is collected in real time by using the resource monitoring probe according to the set sampling period, and an original resource consumption data sequence containing a time sequence relationship is generated;

[0065] The numerical difference between adjacent sampling points in the original resource consumption data sequence is calculated, and denoising processing is performed to obtain a denoised resource consumption data sequence;

[0066] The denoised resource consumption data sequence is subjected to piecewise cubic spline interpolation, a continuous resource consumption curve is constructed based on the interpolation coefficient, and a resource feature parameter of the network security test case is calculated according to the resource consumption curve, and the resource feature parameter is organized into a resource feature vector of the network security test case.

[0067] In the process of acquiring the minimum execution time granularity of the network security test case, the operation unit with the shortest execution time in the test case needs to be determined. Specifically, the test case can be pre-executed multiple times, the execution time of various operations (such as network connection establishment, data packet sending, encryption and decryption operations, etc.) contained therein is recorded, and the value of the operation with the shortest execution time among these operations is selected as the minimum execution time granularity. For example, for a network scanning test case, through 10 times of pre-execution, it is found that the shortest execution time of the TCP SYN probe operation is 5 milliseconds, and 5 milliseconds is selected as the minimum execution time granularity of the test case.

[0068] Based on the acquired minimum execution time granularity, the sampling period of the resource monitoring probe is set. To ensure the accuracy of the collected data, the sampling period should be less than or equal to the minimum execution time granularity. In practice, the sampling period can be set to 1 / 2 to 1 / 3 of the minimum execution time granularity. Continuing the above example, if the minimum execution time granularity of the test case is 5 milliseconds, the sampling period can be set to 2 milliseconds to ensure that the changes in resource consumption during the execution of the test case can be captured.

[0069] The set resource monitoring probe collects resource consumption data in real time according to the determined sampling period. The monitored resource items usually include CPU usage, memory occupancy, network traffic, disk I / O, etc. During the execution of the test case, the probe records the usage of each resource according to the set sampling period (e.g., 2 milliseconds) and records the corresponding timestamp, forming a raw resource consumption data sequence that includes the timing relationship. For example, for the monitoring of CPU usage, the following data sequence may be obtained: [(0, 5%), (2ms, 8%), (4ms, 15%), (6ms, 22%), (8ms, 18%)], where the first element of each tuple is the timestamp and the second element is the CPU usage at the corresponding time.

[0070] To reduce the noise in the original data, the numerical difference between adjacent sampling points in the original resource consumption data sequence needs to be calculated and denoising processing needs to be performed. In specific implementation, the change in resource consumption value between two adjacent sampling points can be calculated, and when the change exceeds a preset threshold, it is considered to be an effective change, otherwise it is considered to be noise and is smoothed. For example, the threshold of CPU usage is set to 3%, and for the original sequence [(0, 5%), (2ms, 8%), (4ms, 15%), (6ms, 22%), (8ms, 18%)], the difference between adjacent points is calculated as [3%, 7%, 7%, -4%], where the first, second, and third differences exceed the threshold and are considered to be effective changes; the absolute value of the fourth difference exceeds the threshold and is also considered to be an effective change. If the change of a certain point is less than the threshold, the value of the point can be replaced by the value of the previous point, thereby achieving denoising. After denoising, a more smooth resource consumption data sequence is obtained.

[0071] The denoised resource consumption data sequence is segmented and cubic spline interpolated to construct a continuous resource consumption curve. In specific implementation, the denoised data sequence is divided into several segments in chronological order, each segment containing 4 or more data points. Within each segment, a cubic polynomial function is used to fit the data in the segment, ensuring that the function value and its first and second derivatives are continuous at the connection between segments, thereby ensuring the smoothness of the overall curve. Taking CPU usage as an example, assuming the denoised sequence is [(0, 5%), (2ms, 8%), (4ms, 15%), (6ms, 22%), (8ms, 18%)], a continuous function can be obtained using cubic spline interpolation, which has the same value as the original data point at each known data point, and the overall curve is smooth.

[0072] Based on the generated resource consumption curve, the resource characteristic parameters of the network security test case are calculated. Specifically, the following characteristic parameters can be extracted: peak value, mean value, variance of resource usage, time point of peak value, duration of resource usage rate exceeding a certain threshold, rising rate and falling rate of resource consumption curve, etc. For example, for the CPU usage curve, the maximum CPU usage during test case execution is 22%, the average usage is 13.6%, the duration of CPU usage rate exceeding 15% is 4ms, and the rising rate of CPU usage rate is 3.5% / ms.

[0073] The calculated multiple resource characteristic parameters are organized into a resource feature vector of the network security test case. This feature vector contains the consumption characteristics of the test case in different resource dimensions, and can be represented as [CPU peak, CPU mean, memory peak, memory mean, network traffic peak, network traffic mean,...]. For example, the resource feature vector of a network scanning test case may be [22%, 13.6%, 105MB, 78MB, 50Mbps, 20Mbps,...]. These feature vectors can be used for subsequent test case classification, resource estimation, and anomaly detection tasks.

[0074] The network security test case resource feature vector obtained through the above steps can accurately describe the resource consumption pattern during test case execution, providing data support for resource planning and optimization of network security testing, and improving test efficiency and accuracy.

[0075] In an optional implementation, the resource competition relationship between test cases is calculated based on the resource feature vector, the competition degree of test cases is measured by the overlap of peak consumption points, a resource conflict matrix of test cases is established, and a resource concurrency threshold of test cases is determined, including:

[0076] Based on the resource feature vector analysis of the execution time sequence of the test case, the execution time interval of the test case is extracted, the length of the time overlap interval between the test cases is calculated, and the ratio of the total execution time of the test cases is obtained.

[0077] In the time overlap interval, the resource feature vectors of the test cases are aligned, the overlap of the resource consumption peak in the resource feature vector is calculated, and the ratio of the system resource upper limit is obtained.

[0078] The product of the resource competition relationship and the time overlap ratio is taken as the competition degree, the resource conflict matrix is constructed, the eigenvalue decomposition of the resource conflict matrix is carried out, the competition mode is extracted based on the eigenvector, the competition intensity of the test case in the competition mode is calculated, and the resource concurrency threshold of the test case is determined in combination with the system resource capacity upper limit.

[0079] The method of the application tests the competition degree of the test case by the overlap of the peak consumption point, establishes the resource conflict matrix of the test case, and finally determines the resource concurrency threshold of the test case.

[0080] In the specific implementation, first, the resource feature vector of the test case is obtained. The resource feature vector represents the consumption of each resource of the system during the execution of the test case, including CPU usage, memory occupation, disk I / O, network bandwidth and other indicators. By sampling the system resource usage during the execution of the test case, the resource consumption sequence varying with time can be obtained. For example, during the execution of a test case A, the CPU usage is sampled at a frequency of once per second as [20%, 35%, 65%, 80%, 45%, 30%], and the memory occupation is sampled as [200MB, 250MB, 300MB, 350MB, 300MB, 250MB]. These data form the resource feature vector of the test case A at each time point.

[0081] When analyzing the execution time sequence of the test case based on the resource feature vector, the start time and the end time of each test case need to be recorded. It is assumed that the execution time of the test case A is t1 to t6, and the execution time of the test case B is t4 to t9. By comparing these time intervals, the time overlap interval between the test cases can be determined. In the above example, the time overlap interval of A and B is t4 to t6, and the overlap length is 3 time units. The total execution time of the test case A is 6 time units, and the total execution time of the test case B is 6 time units, so the time overlap ratio is calculated as the overlap length divided by the sum of the execution time, that is, 3 / (6+6-3)=0.33.

[0082] After determining the time overlap interval, the resource competition relationship needs to be calculated within this interval. The system aligns the resource feature vectors of the test cases within the overlap interval, analyzes the peak consumption points of each resource. In the overlap interval t4 to t6, assuming that the CPU usage rate of test case A is [80%, 45%, 30%], the CPU usage rate of test case B is [25%, 60%, 75%], and the system resource upper limit is 100%. The sum of resource consumption at the corresponding time points of the two sets of data is [105%, 105%, 105%], which exceeds the system resource upper limit. Taking the average of the excess part as 5%, the resource competition relationship is the ratio of the excess part to the system resource upper limit, which is calculated as 5% / 100%=0.05. Similarly, the competition relationship of other resource items is calculated, and the maximum value is taken as the final resource competition relationship index.

[0083] The competition degree is calculated by multiplying the resource competition relationship and the time overlap ratio. In the above example, the competition degree is 0.05x0.33=0.0165. For all pairs of test cases in the system, their competition degrees are calculated to construct a resource conflict matrix. Assuming that the system has four test cases A, B, C, and D, the conflict matrix is a 4x4 matrix, where the diagonal elements are 0 (indicating that the test case does not compete with itself), and the non-diagonal elements represent the competition degree of the corresponding test case pair.

[0084] Eigenvalue decomposition of the constructed resource conflict matrix can extract the competition pattern of the test cases. The eigenvalue size represents the significance of the competition pattern, and the corresponding eigenvector represents the participation intensity of each test case in the competition pattern. The eigenvectors corresponding to the largest eigenvalues are selected as the main competition patterns. For example, through decomposition, the largest eigenvalue is 0.25, and the corresponding eigenvector is [0.6, 0.5, 0.4, 0.3], indicating that test case A has the largest participation intensity in the competition pattern, which is 0.6.

[0085] When calculating the competition intensity of test cases in each competition pattern, the components of the test cases in the eigenvector are multiplied by the corresponding eigenvalue. Combined with the system resource capacity upper limit, the resource concurrency threshold of the test case can be determined. Assuming that the system CPU resource upper limit is 4 cores and the memory upper limit is 8 GB, it is known through analysis that the competition intensity of test case A in the main competition pattern is 0.15, which is converted to actual resource occupation of about 0.6 core CPU and 1.2 GB memory. Considering the safety margin of resource usage, set the resource utilization rate not to exceed 80%, then the number of test cases A that can be run simultaneously in the system is min(4x0.8 / 0.6, 8x0.8 / 1.2)=5.

[0086] By the above method, the resource competition relationship between test cases can be scientifically evaluated, the test instability caused by resource conflicts can be avoided, and the test efficiency and system resource utilization can be improved. This method is particularly suitable for performance testing, stress testing and testing scenarios that require high concurrency execution of complex systems, and can effectively guide the formulation of test case scheduling and resource allocation strategies.

[0087] In an optional implementation, the resource competition degree between test cases is identified according to the resource conflict matrix and the resource concurrency threshold, the minimum execution interval duration is calculated for test cases with a competition degree higher than a preset competition value, and a peak-shaving distribution strategy is used to generate an optimized test case execution time sequence.

[0088] A competition degree evaluation function is constructed based on the resource conflict matrix and the resource concurrency threshold, and the resource competition degree between test cases is calculated by using the competition degree evaluation function in combination with the peak resource occupancy rate of the test cases. Test cases with a resource competition degree exceeding a preset competition threshold are determined as test cases to be scheduled, and a competition relationship matrix of test cases in the test case group to be scheduled is established.

[0089] The resource superposition effect value is calculated for the test case group to be scheduled, and the minimum execution interval duration that minimizes the resource superposition effect value is determined by a bisection interval iteration method in combination with the resource concurrency threshold.

[0090] The test case group to be scheduled is constructed as a competition graph, a weighted connection edge is established in the competition graph based on the competition relationship matrix, and the minimum execution interval duration is used as an edge weight constraint.

[0091] An execution time allocation scheme of the test cases is searched by an iterative search method of simulated annealing algorithm. In each iteration, the execution time of adjacent test cases is adjusted by peak-shaving based on the edge weight constraint, and the search temperature coefficient is dynamically adjusted until convergence to obtain a peak-shaving optimized test case execution time sequence.

[0092] In this embodiment, a resource conflict matrix is first established, which records the occupancy of different resource types by each test case during execution. The resource types include but are not limited to CPU usage, memory occupancy, network bandwidth, storage IO, etc. The resource concurrency threshold defines the upper limit value of each type of resource when used by multiple test cases at the same time, for example, the concurrency threshold of CPU usage can be set to 85%, the concurrency threshold of network bandwidth can be set to 90%, etc.

[0093] Based on the above resource conflict matrix and resource concurrency threshold, a competition degree evaluation function is constructed. The competition degree evaluation function can be expressed as the ratio relationship of the resource occupation rate vectors of two test cases to the resource concurrency threshold, which is used to quantify the intensity of resource competition between test cases. In specific implementation, for any two test cases A and B, their peak resource occupation rate vectors are extracted and denoted as RA and RB respectively. The competition degree evaluation function calculates the weighted superposition value of these two vectors in each dimension, and compares it with the concurrency threshold of the corresponding resource. For example, if the CPU peak occupation of test case A is 60%, the CPU peak occupation of test case B is 40%, and the CPU concurrency threshold is 85%, then the competition degree of these two test cases on the CPU resource can be calculated as (60%+40%) / 85%-1, and the result is 17.6%, which represents the proportion exceeding the threshold.

[0094] After calculating the resource competition degree of all test case pairs, the test case pairs whose competition degree exceeds the preset competition threshold (such as 15%) are identified, and the related test cases are classified into the to-be-scheduled test case group. At the same time, a competition relationship matrix is established, which is a symmetric matrix, and the element value represents the competition degree between the corresponding row and column test cases.

[0095] For the to-be-scheduled test case group, the resource superposition effect value is calculated. The resource superposition effect value is a comprehensive reflection index of the peak value of various resources when multiple test cases are executed in time dimension. The minimum execution interval length is determined by the bisection interval iteration method. The specific process is to initially set a time interval range [Tmin, Tmax], such as [0 seconds, 300 seconds], and then gradually narrow the range by bisection method. In each iteration, the midpoint value of the current interval is taken as the interval length to be tested, and the resource superposition effect value when using the interval length is calculated. If the effect value is lower than the target threshold, the upper bound is reduced, otherwise the lower bound is increased, until the minimum interval length that meets the condition is found. For example, after iterative calculation, it may be determined that the test cases competing with each other need to be separated by at least 45 seconds to reduce the resource superposition effect value to an acceptable range.

[0096] After determining the minimum execution interval length, the to-be-scheduled test case group is constructed into a competition graph. In the graph, each node represents a test case, and the connection edge between nodes represents the existence of resource competition relationship between two test cases. The weight of the edge is the minimum execution interval length, which represents that the execution start time of the two test cases needs to be separated by at least the length.

[0097] Analog temperature algorithm is used to search for the optimal test case execution time allocation scheme. The analog temperature algorithm is a probabilistic algorithm that searches for the global optimal solution in the solution space by simulating the physical annealing process. In the initial state, the execution start time of each test case is randomly allocated. In each iteration, a test case is randomly selected and its execution time is adjusted within a certain range. After adjustment, it is checked whether all edge weight constraints are met, that is, whether the execution time of any two test cases with competitive relationship meets the minimum interval requirement. If not, make appropriate adjustments.

[0098] In the analog temperature process, a temperature parameter is introduced to control the probability of accepting suboptimal solutions. When the initial temperature is high, there is a high probability of accepting temporarily performance-degrading solutions to escape local optima; as the iteration proceeds, the temperature gradually decreases, and it is more inclined to accept performance-improving solutions. For example, the initial temperature can be set to 100, and the temperature decay coefficient is 0.95 after each iteration. When the temperature is lower than 0.01, the algorithm is considered to have converged. The final test case execution timing after peak shifting optimization is obtained, which ensures that test cases with high resource competition degree do not overlap in time, thereby avoiding performance interference and inaccurate test results caused by resource contention.

[0099] Through the implementation of the method, the execution efficiency and result accuracy of network security performance testing are significantly improved. The method can intelligently identify resource conflicts, dynamically calculate the optimal execution interval, and adaptively adjust the execution timing of test cases, effectively avoiding the performance bottleneck and result fluctuation problems caused by resource competition in traditional testing. The method realizes the rational allocation and maximum utilization of test resources through the peak shifting distribution strategy, reduces the test environment requirements, shortens the overall test period, and improves the test coverage and reliability. Especially in complex network environment, it can accurately capture and respond to the complex interaction between multiple test cases, providing more scientific and reliable technical support for network security performance evaluation.

[0100] In an optional implementation, the execution time allocation scheme of the test cases is searched by the analog temperature algorithm, and in each iteration, the execution time of adjacent test cases is adjusted by peak shifting based on the edge weight constraint, and the search temperature coefficient is dynamically adjusted until the peak shifting optimized test case execution timing is obtained, including:

[0101] The initial execution timing of the test case group to be scheduled is taken as the initial solution of the state space, an optimization objective function based on resource competition degree is constructed, and the initial value and the cooling coefficient of the temperature parameter are set;

[0102] According to the temperature parameter, a test case pair is randomly selected from the test case group to be scheduled, the execution time of the test case pair is adjusted by peak shifting according to the minimum execution interval, and a candidate execution timing is generated.

[0103] calculating a target value of the candidate execution timing according to the optimization objective function, accepting the candidate execution timing when the target value difference is negative, calculating an acceptance probability based on the temperature parameter and determining whether to accept the candidate execution timing when the target value difference is positive;

[0104] adjusting the temperature parameter based on the cooling coefficient, repeating the iteration until the temperature parameter is lower than a termination threshold, and outputting the execution timing with the optimal target value as the test case execution timing after peak-shaving optimization.

[0105] For the allocation optimization problem of test case execution time, the embodiment provides a test case peak-shaving scheduling method based on a simulated annealing algorithm. The method searches for a reasonable allocation of test case execution time through iteration to reduce resource competition and improve test efficiency.

[0106] In the specific implementation process, first, the test case group to be scheduled needs to be initialized. The system collects a test group containing multiple test cases, and each test case has an identifier, an estimated execution time, and a resource demand attribute. For example, the test case group to be scheduled can contain 10 test cases {TC1, TC2, …, TC10}, and the estimated execution time of each test case is {5 minutes, 8 minutes, 4 minutes, 6 minutes, 7 minutes, 9 minutes, 3 minutes, 5 minutes, 6 minutes, and 4 minutes}. Based on resource demand analysis, the resource competition degree between test cases is calculated, and a edge weight constraint matrix is constructed to represent the minimum execution interval requirement between test cases. For example, the minimum execution interval between TC1 and TC4 is 2 minutes, and the minimum execution interval between TC2 and TC7 is 3 minutes.

[0107] The initial execution timing of the test case can be arranged in order, for example, TC1 starts execution at 0 minutes, TC2 starts execution at 5 minutes, and so on. This initial allocation scheme is used as the initial solution of the simulated annealing algorithm. To construct the optimization objective function, the resource competition degree index is calculated, which is based on the number of test cases that do not meet the minimum execution interval constraint and the degree of violation. Specifically, if the execution time interval of two test cases is less than the minimum interval required by the edge weight constraint, they are included in the competition degree calculation. The initial value of the temperature parameter is set to 100, and the cooling coefficient is set to 0.95.

[0108] In the iterative search phase, random sampling is performed according to the current temperature parameter. In each iteration, two test cases are randomly selected from the test case group, such as TC3 and TC8. The minimum execution interval constraint between these two test cases is checked, assuming it is 1 minute. If the execution time interval of TC3 and TC8 in the current execution schedule is less than 1 minute, the execution time of one of the test cases is adjusted. For example, if the start execution time of TC3 is 9 minutes and the start execution time of TC8 is 9.5 minutes, the interval is only 0.5 minutes, which is less than the required 1 minute. The execution time of TC8 can be adjusted to 10.5 minutes to ensure that the minimum interval constraint is met, thereby generating a candidate execution schedule.

[0109] For the generated candidate execution schedule, the optimization objective value is calculated. This value reflects the degree of resource competition of the test case group as a whole. The smaller the value, the lower the degree of competition, and the more stable the test environment. Assuming that the target value of the current execution schedule is 25, and the target value of the adjusted candidate execution schedule is 22, the target value difference is -3 (i.e. 22-25). Since the difference is negative, it indicates that the candidate solution is better, and the candidate execution schedule is directly accepted as the new current solution.

[0110] If the target value of the candidate execution schedule is 28, the target value difference is 3 (i.e. 28-25). At this time, the difference is positive, indicating that the candidate solution is not as good as the current solution. In this case, the system does not directly reject the candidate solution, but calculates the acceptance probability based on the current temperature parameter. The acceptance probability is calculated as an exponential decay function, so the larger the difference and the lower the temperature, the smaller the acceptance probability. For example, when the temperature is 100, the acceptance probability of a difference of 3 is about 0.97; when the temperature drops to 10, the acceptance probability of the same difference drops to about 0.74. The system generates a random number between 0 and 1, such as 0.8. If the random number is less than the calculated acceptance probability, the candidate solution is accepted; otherwise, the current solution remains unchanged.

[0111] After completing a certain number of inner iterations (such as 100 times), the temperature parameter is adjusted according to the cooling coefficient. For example, the current temperature is 100 and the cooling coefficient is 0.95, so the adjusted temperature is 95. The temperature parameter is constantly lowered, causing the algorithm to gradually transition from global exploration to local search. When the temperature parameter falls below the termination threshold (such as 0.1), the iteration process terminates.

[0112] During the entire iteration process, the optimal execution schedule and its target value encountered are recorded. After all iterations are completed, the execution schedule with the optimal target value is output as the peak-shaving optimized test case execution schedule. For example, the final optimized execution schedule may be: TC1 starts execution at 0 minutes, TC4 starts execution at 7 minutes, TC2 starts execution at 12 minutes, and so on, so that the execution time interval between any two test cases that compete for resources satisfies the minimum interval constraint.

[0113] The method is suitable for various automatic test scenarios, especially for complex test environments sensitive to resources and mutual interference. By using the simulated annealing algorithm to find an execution time sequence close to the global optimum, the problem that the traditional fixed time interval scheduling cannot adapt to the differences in resource requirements of different test cases is effectively solved, and the reliability and efficiency of test execution are improved.

[0114] As shown in Figure 2 The test case execution time sequence optimization process based on the resource conflict matrix of the present embodiment is shown.

[0115] In an optional implementation, the resource cumulative effect of the test cases in the execution time sequence is analyzed by using the resource conflict matrix, the system resource bottleneck point is dynamically predicted, and the execution time sequence of the test cases is adjusted in advance based on the prediction result, realizing the predictive optimization of the test load and outputting the test result, including:

[0116] Based on the resource conflict matrix, the resource usage of the test cases in the current execution time sequence is analyzed, the resource overlap occupation degree of adjacent test cases in the time window is calculated, and the resource cumulative effect value is obtained by combining the resource consumption weight of the test cases;

[0117] The time sequence change characteristics are obtained by dynamically sampling the resource cumulative effect value, the prediction result is obtained by performing exponential smoothing operation on the time sequence change characteristics and the current resource cumulative effect value, the smoothing factor is adaptively adjusted based on the deviation between the prediction result and the actual value, and the resource cumulative effect prediction value at the future time is generated;

[0118] The resource cumulative effect prediction value is compared with the system resource threshold to dynamically identify the resource bottleneck point, the cumulative influence weight of each test case in the resource conflict matrix is calculated, and the adjustment priority level of the test case is determined according to the cumulative influence weight;

[0119] The test cases are sorted based on the adjustment priority level, the adjustment step of the execution time sequence is determined by combining the difference between the predicted time of the resource bottleneck point and the current time, the execution time of the test case with a priority higher than a preset priority threshold is adjusted in advance, and the execution time sequence of the test case after predictive optimization is output.

[0120] In this embodiment, the resource usage of test cases in the current execution timing is analyzed through a resource conflict matrix. The resource conflict matrix is a two-dimensional array, where the rows represent test cases and the columns represent various types of resources, and the matrix element values represent the occupation degree of a specific test case to a specific resource. For example, for a DDoS attack test case in network security performance testing, its network bandwidth resource occupation value in the matrix may be 85%, and the memory occupation value is 30%. When calculating the resource overlap occupation degree of adjacent test cases in the time window, a sliding time window of 60 seconds is set, and the superimposed occupation of each resource by the test cases executed simultaneously in this window is counted. For network bandwidth resources, if there are three test cases simultaneously executed in the window, with network bandwidth occupation of 60%, 40%, and 30% respectively, the resource overlap occupation value is the weighted sum of these three values, and the weight can be determined by the execution importance of the test case. Assuming that the resource consumption weights of the three test cases are 1.0, 0.8, and 0.6 respectively, the resource cumulative effect value of the network bandwidth is 60% × 1.0 + 40% × 0.8 + 30% × 0.6 = 60% + 32% + 18% = 110%, indicating that the network bandwidth has a 10% overload.

[0121] The resource cumulative effect value is dynamically sampled to obtain its timing change characteristics. Dynamic sampling refers to recording the resource cumulative effect value once every fixed time interval (such as 5 seconds) to form time series data. From these data, timing change characteristics are extracted, including trend, periodicity, and abruptness, etc. Exponential smoothing operation is performed on the timing change characteristics and the current resource cumulative effect value to obtain the prediction result of future resource usage. Exponential smoothing operation is a prediction method that performs weighted average on historical data, and the weight decays exponentially over time. The smoothing factor a controls the influence degree of the latest observation value on the prediction. Initially, a = 0.3, if the deviation between the predicted value and the actual value exceeds 10%, increase the value of a (such as increase by 0.05), so that the prediction is more sensitive to the latest changes; if the deviation is less than 5%, decrease the value of a (such as decrease by 0.02), so that the prediction is more stable. By adaptively adjusting the smoothing factor in this way, the prediction accuracy is improved. For example, the network bandwidth resource cumulative effect value at a certain moment is 80%, and the exponential smoothing operation with a = 0.3 predicts the value at the next moment to be 88%, while the actual measured value is 95%, with a deviation of 7%. At this time, a is kept unchanged; the predicted value at the next moment is 90%, and the actual value is 98%, with a deviation of 8%. At this time, a is adjusted to 0.35, so that the prediction follows the rising trend more quickly.

[0122] The resource accumulation effect prediction value is compared with the system resource threshold value to dynamically identify the resource bottleneck point. The resource bottleneck point refers to the time point at which the resource accumulation effect prediction value exceeds the system resource threshold value. The system resource threshold value is set according to different resource types, such as a CPU usage threshold of 90%, a memory occupancy threshold of 85%, a network bandwidth threshold of 95%, and the like. The cumulative impact weight of each test case in the resource conflict matrix is calculated, which reflects the degree of contribution of the test case to the potential resource bottleneck. The cumulative impact weight calculation method is: multiplying the occupation value of the test case in the resource conflict matrix corresponding to the bottleneck resource by the execution frequency of the test case, and then multiplying by a resource sensitivity coefficient. For example, if it is predicted that the network bandwidth will become a bottleneck after 60 seconds, the occupation of a certain test case to the network bandwidth is 70%, the execution frequency is 2 times per minute, and the resource sensitivity coefficient of the network bandwidth is 1.2, then the cumulative impact weight of the test case is 70% x 2 x 1.2 = 168%. The adjustment priority level of the test case is determined according to the cumulative impact weight, and the higher the weight, the higher the priority level.

[0123] The test cases are sorted based on the adjustment priority level, and the difference between the predicted time of the resource bottleneck point and the current time is used to determine the adjustment step of the execution timing. The adjustment step calculation method is: a certain proportion of the difference between the predicted time and the current time, such as 20% of the difference. The execution time of the test case with a priority higher than a preset priority threshold is adjusted in advance. The advance adjustment refers to advancing the execution of the test case to avoid the resource bottleneck point. For example, if the resource bottleneck point is expected to occur after 120 seconds, and the adjustment step is 24 seconds, then the execution time of the high-priority test case is advanced by 24 seconds. In this way, the test cases with high resource consumption will be executed at different times to avoid resource competition in the same time period.

[0124] Through the network security performance test load intelligent scheduling optimization method of the embodiment, the resource bottleneck problem in the test process can be effectively predicted and avoided, and the test efficiency and result accuracy are improved. The method realizes the forward-looking management of the test load by dynamically analyzing the resource usage and predicting the future resource consumption trend. Compared with the traditional passive response scheduling method, the method can identify potential risks in advance and actively adjust the test execution plan, significantly reducing the test failure and result instability problems caused by resource competition. By accurately calculating the impact of the test case on the resource, targeted scheduling optimization is realized, avoiding the time waste caused by unnecessary global adjustment. Especially in the high-concurrency and large-scale network security test scene, the predictive optimization capability of the method greatly improves the resource utilization rate of the test environment and the parallelism of the test execution, providing more reliable and efficient technical support for the performance evaluation of network security products, shortening the test period and reducing the test cost.

[0125] In an optional embodiment, the resource accumulation effect prediction value is compared with the system resource threshold to dynamically identify the resource bottleneck point, and the calculation of the cumulative influence weight of each test case in the resource conflict matrix comprises:

[0126] The resource accumulation effect prediction value is mapped to a resource pressure change curve, and the intersection position of the resource pressure change curve and the system resource threshold is searched, and the time corresponding to the intersection point is determined as the resource bottleneck point.

[0127] At the resource bottleneck point, the resource occupation data of each test case is extracted from the resource conflict matrix, and the resource occupation data is subjected to ratio operation with the total resource pressure at the resource bottleneck point.

[0128] The cumulative influence weight of each test case is calculated based on the ratio operation result, and the cumulative influence weight represents the contribution degree of the test case to the resource bottleneck point.

[0129] When performing system testing, the parallel execution of multiple test cases will cause system resource contention, thereby generating performance bottlenecks. In order to accurately identify these bottleneck points and determine the contribution degree of each test case to the bottleneck formation, the present scheme first constructs a resource accumulation effect prediction model. Based on historical test data, the model models the change trend of key system resources such as CPU usage, memory occupation, disk I / O, and network bandwidth during test execution. For example, for a test suite containing 10 test cases, the occupation of each test case to each resource when executed independently is collected through a monitoring tool to form a basic resource occupation feature matrix.

[0130] The resource accumulation effect prediction model uses time series analysis method to superimpose the resource occupation data of each test case according to the predetermined execution order. Taking CPU resource as an example, if the CPU occupation rate of test case A at t1 is 30%, and the CPU occupation rate of test case B at the same time is 25%, the model will predict that when the two test cases are executed concurrently, the CPU cumulative occupation rate at t1 is about 55% (considering the slight floating of resource scheduling factors). In this way, the system generates a resource pressure change curve that changes with time, which describes the dynamic change of resource occupation in the test process.

[0131] After the resource pressure change curve is generated, the thresholds of various resources are set. These thresholds are usually determined based on system configuration and performance requirements, for example, the CPU usage threshold may be set to 80%, and the memory usage threshold may be set to 75%. When the resource pressure change curve intersects with these preset thresholds, the time corresponding to the intersection point is identified as a potential resource bottleneck point.

[0132] To make this process more intuitive, assume that in one test execution, it is monitored that at the 15th minute after the test starts, the predicted CPU usage reaches 83%, which exceeds the preset threshold of 80%. At this time, the system will mark this time as the bottleneck point of the CPU resource. Similarly, if at the 23rd minute, the memory usage reaches 78%, which exceeds the threshold of 75%, then the 23rd minute will also be marked as the bottleneck point of the memory resource.

[0133] After determining the resource bottleneck point, relevant data will be extracted from the pre-constructed resource conflict matrix. The resource conflict matrix is a multi-dimensional data structure that records the occupation of various system resources by each test case at different time points. For example, at the 15th minute of the CPU bottleneck point, the system will extract the CPU occupation data of all test cases being executed at that time. Assume that at this time, test case C occupies 35% of the CPU resource, test case D occupies 28% of the CPU resource, and test case E occupies 20% of the CPU resource, with a total CPU pressure of 83%.

[0134] Next, the system will perform a ratio operation to calculate the resource occupation proportion of each test case. Using the above example, the CPU occupation proportion of test case C is 35% ÷ 83% ≈ 0.422, the occupation proportion of test case D is 28% ÷ 83% ≈ 0.337, and the occupation proportion of test case E is 20% ÷ 83% ≈ 0.241. These ratios reflect the direct contribution of each test case to the bottleneck formation.

[0135] Based on the ratio operation result, the cumulative impact weight of each test case is further calculated. The cumulative impact weight not only considers the direct resource occupation of the test case at the bottleneck point, but also considers its continuous impact on the overall load of the system. The calculation method is to multiply the resource occupation proportion of the test case at the bottleneck point with its duration, and then combine the resource fluctuation characteristics of the test case in the entire test period.

[0136] Continuing with the above example, assume that the duration of test case C at the CPU bottleneck point is 3 minutes, the duration of test case D is 5 minutes, and the duration of test case E is 2 minutes. At the same time, consider that the CPU occupation fluctuation of test case C during execution is larger (standard deviation is 15%), while the fluctuations of test cases D and E are smaller (standard deviations are 8% and 5% respectively). Taking these factors into consideration, the cumulative impact weight of test case C is 0.422 × 3 × (1 + 0.15) ≈ 1.45, the cumulative impact weight of test case D is 0.337 × 5 × (1 + 0.08) ≈ 1.82, and the cumulative impact weight of test case E is 0.241 × 2 × (1 + 0.05) ≈ 0.51.

[0137] The cumulative impact weight calculated can clearly identify which test case contributes most to the formation of the resource bottleneck. In the above example, although test case C has the highest instantaneous resource occupancy at the bottleneck point, since test case D has a longer duration, the cumulative impact weight of test case D is higher, indicating that it has a more significant overall impact on system performance.

[0138] This method of dynamically identifying resource bottleneck points and calculating test case cumulative impact weights provides data support for test optimization. The test team can adjust the execution order or concurrency strategy of the test cases, or optimize those test cases that contribute more to the bottleneck, thereby improving overall test efficiency and system performance.

[0139] In a second aspect, the embodiment of the present application provides a network security performance test load intelligent scheduling optimization system, the system comprises:

[0140] A first unit is configured to obtain network security test cases, collect resource consumption data of each test case, generate a resource consumption curve, and calculate a resource feature vector of the test case according to the resource consumption curve;

[0141] A second unit is configured to calculate resource competition relationships between test cases based on the resource feature vector, measure the competition degree of the test cases by the overlap of the peak consumption points, establish a resource conflict matrix of the test cases, and determine a resource concurrency threshold of the test cases;

[0142] A third unit is configured to identify the resource competition degree between test cases according to the resource conflict matrix and the resource concurrency threshold, calculate a minimum execution interval duration for a test case with a competition degree higher than a preset competition value, and generate an optimized test case execution time sequence by using a staggered distribution strategy;

[0143] A fourth unit is configured to analyze the resource cumulative effect of the test cases in the execution time sequence by using the resource conflict matrix, dynamically predict a system resource bottleneck point, and pre-adjust the execution time sequence of the test cases based on the prediction result, to realize predictive optimization of the test load and output a test result.

[0144] In a third aspect, the embodiment of the present application provides an electronic device, comprising:

[0145] A processor;

[0146] A memory for storing processor-executable instructions;

[0147] The processor is configured to invoke the instructions stored in the memory to execute the method described above.

[0148] In a fourth aspect, the present application provides a computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method described above.

[0149] The present application can be a method, an apparatus, a system, and / or a computer program product. The computer program product can include a computer readable storage medium (or media) having computer readable program instructions thereon for performing various aspects of the present application.

[0150] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for intelligent scheduling and optimization of network security performance testing load, characterized in that, include: Obtain network security test cases, collect resource consumption data for each test case, generate resource consumption curves, and calculate resource feature vectors for the test cases based on the resource consumption curves; The resource competition relationship between test cases is calculated based on resource feature vectors. The degree of competition between test cases is measured by the overlap of peak consumption points. A resource conflict matrix of test cases is established to determine the resource concurrency threshold of test cases. Based on the resource conflict matrix and resource concurrency threshold, the resource contention between test cases is identified. For test cases with contention higher than the preset contention value, the minimum execution interval is calculated, and an optimized test case execution sequence is generated using a staggered distribution strategy. The resource conflict matrix analysis method is used to analyze the cumulative resource effect of test cases in the execution sequence, dynamically predict system resource bottlenecks, and make advance adjustments to the execution sequence of test cases based on the prediction results, thereby achieving predictive optimization of test load and outputting test results.

2. The method according to claim 1, characterized in that, Obtain network security test cases, collect resource consumption data for each test case, generate resource consumption curves, and calculate the resource feature vectors of the test cases based on the resource consumption curves, including: Obtain the minimum execution time granularity of network security test cases, set the sampling period of resource monitoring probes based on the minimum execution time granularity, collect resource consumption data in real time, and generate a raw resource consumption data sequence containing time-series relationships; Calculate the numerical difference between adjacent sampling points in the original resource consumption data sequence and perform denoising to obtain the denoised resource consumption data sequence; The denoised resource consumption data sequence is segmented into cubic spline interpolation. A continuous resource consumption curve is constructed based on the interpolation coefficients. Resource feature parameters of network security test cases are calculated based on the resource consumption curves. The resource feature parameters are then organized into resource feature vectors for network security test cases.

3. The method according to claim 1, characterized in that, Based on resource feature vectors, the resource contention relationship between test cases is calculated. The degree of competition among test cases is measured by the overlap of peak consumption points. A resource conflict matrix for test cases is established, and the resource concurrency threshold for test cases is determined, including: Based on resource feature vector analysis, the execution timing of test cases is analyzed, the execution time interval of test cases is extracted, and the ratio of the length of the time overlap interval between test cases to the total execution time of test cases is calculated to obtain the time overlap ratio. Within the time overlap interval, align the resource feature vectors of the test cases, calculate the ratio of the overlap of the peak resource consumption in the resource feature vectors to the upper limit of system resources, and obtain the resource competition relationship. The product of resource competition relationship and time overlap ratio is used as the competition degree to construct a resource conflict matrix. The resource conflict matrix is ​​decomposed into eigenvalues, and competition patterns are extracted based on eigenvectors. The competition intensity of test cases in the competition patterns is calculated, and the resource concurrency threshold of test cases is determined in combination with the upper limit of system resource capacity.

4. The method according to claim 1, characterized in that, Based on the resource conflict matrix and resource concurrency threshold, the resource contention level between test cases is identified. For test cases with contention levels higher than a preset contention value, the minimum execution interval is calculated, and an optimized test case execution sequence is generated using a staggered distribution strategy, including: A competition evaluation function is constructed based on the resource conflict matrix and the resource concurrency threshold. The resource competition degree between test cases is calculated by combining the competition evaluation function with the peak resource utilization rate of the test cases. Test cases with resource competition degree exceeding the preset competition threshold are identified as test cases to be scheduled. The test cases to be scheduled are assigned to the test case group to be scheduled, and a competition relationship matrix of test cases within the test case group to be scheduled is established. For the group of test cases to be scheduled, calculate the resource superposition effect value, and combine it with the resource concurrency threshold to determine the minimum execution interval duration that minimizes the resource superposition effect value through a binary interval iteration method; The test case group to be scheduled is constructed as a competition graph. Weighted connection edges are established in the competition graph based on the competition relationship matrix, and the minimum execution interval is used as the edge weight constraint. The simulated annealing algorithm iteratively searches for a test case execution time allocation scheme. In each iteration, the execution time of adjacent test cases is adjusted to stagger the peaks based on the edge weight constraints. The search temperature coefficient is dynamically adjusted until convergence is obtained to obtain the staggered and optimized test case execution time sequence.

5. The method according to claim 4, characterized in that, The simulated annealing algorithm iteratively searches for a test case execution time allocation scheme. In each iteration, the execution time of adjacent test cases is adjusted to avoid peaks based on the edge weight constraints. The search temperature coefficient is dynamically adjusted until convergence, resulting in the optimized test case execution sequence, including: The initial execution sequence of the test case group to be scheduled is used as the initial solution of the state space. An optimization objective function based on resource contention is constructed, and the initial values ​​of the temperature parameter and the cooling coefficient are set. According to the temperature parameters, an iterative search is performed, and test case pairs are randomly selected from the group of test cases to be scheduled. The execution time of the test case pairs is adjusted to stagger the peak according to the minimum execution interval, and a candidate execution sequence is generated. The target value of the candidate execution sequence is calculated based on the optimization objective function. When the difference between the target values ​​is negative, the candidate execution sequence is accepted. When the difference between the target values ​​is positive, the acceptance probability is calculated based on the temperature parameter, and it is determined whether to accept the candidate execution sequence. Adjust the temperature parameters based on the cooling coefficient, repeat the iteration until the temperature parameters are lower than the termination threshold, and output the execution sequence with the optimal target value as the test case execution sequence after peak-shifting optimization.

6. The method according to claim 1, characterized in that, Resource conflict matrix analysis is used to analyze the cumulative resource effect of test cases during execution, dynamically predict system resource bottlenecks, and preemptively adjust the execution timing of test cases based on the prediction results. This achieves predictive optimization of test load and outputs test results including: Based on the resource conflict matrix analysis, the resource usage of test cases in the current execution sequence is analyzed, the degree of resource overlap between adjacent test cases within the time window is calculated, and the cumulative resource effect value is obtained by combining the resource consumption weight of the test cases. The resource cumulative effect value is dynamically sampled to obtain time-series change characteristics. The time-series change characteristics are then exponentially smoothed with the current resource cumulative effect value to obtain the prediction result. Based on the deviation between the prediction result and the actual value, the smoothing factor is adaptively adjusted to generate the predicted value of the resource cumulative effect at future times. The predicted value of the cumulative effect of resources is compared with the system resource threshold to dynamically identify resource bottlenecks. The cumulative impact weight of each test case in the resource conflict matrix is ​​calculated, and the adjustment priority of the test cases is determined based on the cumulative impact weight. Test cases are sorted based on their priority levels. The step size for adjusting the execution sequence is determined by the difference between the predicted time of the resource bottleneck and the current time. The execution time of test cases with a priority higher than the preset priority threshold is adjusted in advance, and the execution sequence of test cases with predictive optimization is output.

7. The method according to claim 6, characterized in that, Resource bottlenecks are dynamically identified by comparing the predicted cumulative effect of resources with system resource thresholds. The cumulative impact weight of each test case in the resource conflict matrix is ​​calculated, including: The predicted value of the cumulative effect of resources is mapped to the resource pressure change curve. The intersection point of the resource pressure change curve with the system resource threshold is searched, and the time corresponding to the intersection point is determined as the resource bottleneck point. At the resource bottleneck point, the resource usage data of each test case is extracted from the resource conflict matrix, and the ratio of the resource usage data to the total resource pressure at the resource bottleneck point is calculated. The cumulative impact weight of each test case is calculated based on the ratio calculation result. The cumulative impact weight represents the degree of contribution of the test case to the resource bottleneck.

8. A network security performance testing load intelligent scheduling and optimization system, used to implement the method of any one of claims 1-7, characterized in that, include: The first unit is used to acquire network security test cases, collect resource consumption data for each test case, generate resource consumption curves, and calculate resource feature vectors for test cases based on the resource consumption curves. The second unit is used to calculate the resource competition relationship between test cases based on resource feature vectors, measure the degree of competition of test cases by the overlap of peak consumption points, establish the resource conflict matrix of test cases, and determine the resource concurrency threshold of test cases. The third unit is used to identify the resource contention between test cases based on the resource conflict matrix and the resource concurrency threshold, calculate the minimum execution interval for test cases with a contention higher than the preset contention value, and generate the optimized test case execution sequence using a staggered distribution strategy. The fourth unit is used to analyze the cumulative resource effect of test cases in the execution sequence using a resource conflict matrix, dynamically predict system resource bottlenecks, and make advance adjustments to the execution sequence of test cases based on the prediction results, thereby achieving predictive optimization of test load and outputting test results.

9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Automatic intelligent testing system and method for software application

    CN119127719A

  • Test method and device, computing equipment and computer readable storage medium

    CN119357063A