Cloud desktop pressure test method and device, computer equipment and storage medium
By building the relationship between system pressure and test parameters and using large-scale self-supervised learning, the problem that existing cloud desktop stress testing technology cannot fully simulate load and reflect performance in real time is solved, and efficient and automated cloud desktop stress testing is achieved.
Patent Information
- Application Number
- CN202411105360.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-13
AI Technical Summary
The existing cloud desktop stress testing technology cannot fully simulate real loads, cannot dynamically reflect system performance changes in real time, and is complex in operation and inefficient, making it difficult to meet the requirements of cloud desktop stress testing in large-scale and multi-scenarios.
By obtaining system logs and operation logs, a relationship between system pressure and test parameters is constructed, and a big model self-supervised learning and fitting relationship is used to generate guiding test parameters to realize cloud desktop stress testing. This method combines the normal mapping relationship and the correction factor equation, considers the normal state and occasional state, automatically captures system performance changes, and improves testing efficiency and automation.
It realizes a comprehensive simulation of real load on cloud desktops, dynamically reflects system performance changes in real time, improves testing efficiency and automation, and avoids the tedious process of manually inputting operating parameters.
Smart Images

Figure CN119127638A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cloud desktop testing, and in particular to a cloud desktop stress testing method, apparatus, computer equipment and storage medium. Background Art
[0002] As enterprise informatization continues to deepen, desktop virtualization technology, as an efficient, flexible, and remotely accessible desktop solution, has been widely used in many fields such as corporate office, distance education, and mobile office. Virtual desktops allow users to access their work environment at any location and at any time through any terminal device, greatly improving work efficiency and flexibility. However, with the expansion of user scale and the increase in business complexity, the performance stability and carrying capacity of cloud desktops are facing unprecedented challenges.
[0003] Existing cloud desktop stress testing technologies mainly rely on traditional performance testing tools, such as stress-ng and iperf. Although these tools can perform separate stress tests on computing resources (CPU, memory), storage resources, and network resources, they have many limitations. First, they cannot achieve simultaneous stress testing of all resources and cannot fully simulate the load conditions of cloud desktops in real production environments. Second, due to the significant differences in load pressure in different user scenarios and time periods, manual statistics require long-term monitoring data and can only reflect the average pressure value in a certain period of time, and cannot reflect the changes in system performance in real time and dynamically. Finally, these tools usually require manual input of operating parameters, which are complex and inefficient to operate, and are difficult to meet the needs of large-scale, multi-scenario cloud desktop stress testing. Summary of the invention
[0004] Based on this, it is necessary to provide a cloud desktop stress testing method, device, computer equipment and storage medium that can fully simulate the real load, dynamically reflect the system performance changes in real time, and improve the testing efficiency and automation level in response to the above technical problems.
[0005] In one aspect, a cloud desktop stress testing method is provided, the method comprising:
[0006] Obtain system logs and operation logs, and obtain system resource data and operation record data;
[0007] According to the system resource data and the operation record data, mapping processing is performed to obtain a relationship between system pressure and test parameters; wherein the relationship between system pressure and test parameters includes a normal mapping relationship and a correction factor relationship;
[0008] The system pressure and test parameter relationship is fitted through large model self-supervised learning to obtain a fitted system pressure and test parameter relationship;
[0009] According to the cloud desktop information to be tested, the resource data to be tested is obtained, and the fitted system pressure and test parameter relationship formula is called to generate the guiding test parameters;
[0010] According to the guiding test parameters, call the integrated test tool to perform cloud desktop stress testing.
[0011] In one embodiment, mapping processing is performed based on the system resource data and the operation record data to obtain a relationship between system pressure and test parameters, including:
[0012] Calculating the system pressure according to the system resource data to obtain the system pressure;
[0013] According to the system pressure, the system resource state is divided into a normal state and an occasional state, and the operation record data is correspondingly divided into a normal state and an occasional state;
[0014] A normal mapping relationship is obtained based on the system resource data in a normal state and the corresponding operation record data; and a correction factor is obtained based on the system resource data in an occasional state.
[0015] In one embodiment, calling the fitted relationship between the system pressure and the test parameter to generate the guiding test parameter includes:
[0016] According to the cloud desktop information to be tested, the resource data to be tested is obtained;
[0017] Calculate the system pressure to obtain the pressure of the system to be tested;
[0018] Dividing the resource data to be tested into a normal state and an occasional state based on the pressure level of the system to be tested;
[0019] When the resource data to be measured is in a normal state, the pressure of the system to be measured is the target pressure; when the resource data to be measured is in an occasional state, the pressure of the system to be measured is corrected according to the correction factor, and the corrected pressure of the system to be measured is used as the target pressure;
[0020] According to the target pressure level and based on the normal mapping relationship, a guiding test parameter is generated.
[0021] In one embodiment, it also includes:
[0022] The system resource data includes: CPU resource data, memory resource data, disk I / O resource data, and bandwidth resource data;
[0023] Calculating the system pressure according to the system resource data includes:
[0024] Obtaining a CPU impact value according to the CPU resource data;
[0025] Obtaining a memory impact value according to the memory resource data;
[0026] Obtaining a disk impact value according to the disk I / O resource data;
[0027] Obtaining a bandwidth impact value according to the bandwidth resource data;
[0028] Obtaining a system pressure degree according to the CPU impact value, the memory impact value, the disk impact value, and the bandwidth impact value;
[0029] in,
[0030] The CPU impact value is calculated based on the CPU impact function, and the CPU impact function is:
[0031]
[0032] Among them, f(t CPU ) is the CPU impact value, t CPU is the CPU utilization, a is the influence coefficient of linear growth, b is the influence coefficient of nonlinear growth, and c is the logarithmic term coefficient that controls the growth rate in the initial stage;
[0033] The memory impact value is obtained based on a memory impact function, and the memory impact function is:
[0034]
[0035] Among them, f(t Memory ) is the memory impact value, t Memory is the memory usage, d is the linear impact coefficient of memory, e is the nonlinear impact coefficient of memory; t MemThreshold is the memory usage threshold; (t Memory -t MemThreshold ) + is the ReLU function, which means that only the part of memory occupancy exceeding the occupancy threshold is considered; f and g are the linear and exponential amplification coefficients of the part of memory occupancy exceeding the occupancy threshold respectively;
[0036] The disk impact value is obtained based on the disk impact function, and the disk impact function is:
[0037]
[0038] Among them, f(Disk) is the disk impact value, IO disk is the disk I / O capacity, IO max is the maximum I / O capacity of the disk, represents the disk I / O utilization; h is the influence coefficient of the disk I / O logarithmic model, i is the influence coefficient of the disk I / O utilization, and j is the nonlinear influence coefficient of the disk I / O utilization;
[0039] The bandwidth impact value is obtained based on a bandwidth impact function, and the bandwidth impact function is:
[0040]
[0041] Among them, f (Bandwidth) is the bandwidth impact value, Traffic is the network traffic, Bandwidth MAX is the maximum bandwidth, Indicates bandwidth utilization; k is the influence coefficient of bandwidth utilization, m is the nonlinear influence coefficient of bandwidth utilization, and n is the influence coefficient of bandwidth logarithmic model;
[0042] The system pressure is obtained based on the system pressure formula, which is:
[0043] S = α·f(t CPU )+β·f(t Memory )+γ·f(Disk)+δ·f(Bandwidth)
[0044] Where S is the system pressure, f(t CPU ) is the CPU impact value, f(t Memory ) is the memory impact value, f(Disk) is the disk impact value, and f(Bandwidth) is the bandwidth impact value; α, β, γ, and δ are the impact weights of CPU resources, memory resources, disk I / O resources, and bandwidth resources on system pressure, respectively.
[0045] In one embodiment, according to the system pressure level, the system resource state is divided into a normal state and an occasional state, and the operation record data is correspondingly divided into a normal state and an occasional state, including:
[0046] A normal threshold is set. When the system pressure is within the normal threshold, the system resource state is set to a normal state. When the system pressure is outside the normal threshold, the system resource state is set to an occasional state.
[0047] The setting of normal thresholds includes:
[0048] Obtain the system resource data within a detection cycle and determine several evaluation indicators; wherein the several evaluation indicators include: CPU utilization, disk I / O utilization, bandwidth utilization, and memory occupancy;
[0049] According to several evaluation indicators, the evaluation threshold of the corresponding evaluation indicator is calculated based on the corresponding mean and standard deviation; the calculation formula of the evaluation threshold is: Threshold resource =μ resource +p×σ resource , where Threshold resource is the initial threshold of the current evaluation index, μ resource is the mean of the current evaluation index, σ resource is the standard deviation of the current evaluation index, and p is the capture constant;
[0050] The evaluation thresholds of several evaluation indicators are combined to obtain the normal threshold;
[0051] The normal threshold is recalculated every several detection cycles;
[0052] Among them, the normal threshold is obtained based on the formula:
[0053] S Threshold =α×Threshold CPU +β×Threshold Memory +γ×Threshold Disk +δ×Threshold Bandwidth ; Among them, S Threshold is the normal threshold of system pressure, Threshold CPU 、Threshold Memory 、Threshold Disk 、Threshold Bandwidth They are the evaluation thresholds of CPU utilization, memory usage, disk I / O utilization, and bandwidth utilization. α, β, γ, and δ are the influence weights of CPU resources, memory resources, disk I / O resources, and bandwidth resources on system pressure.
[0054] In one embodiment, it also includes:
[0055] The operation record data includes: operation timestamp, operation type, and operation parameters;
[0056] The system resource data further includes: CPU utilization, memory occupancy, disk I / O utilization, and bandwidth utilization;
[0057] According to the system resource data in the normal state and the corresponding operation record data, a normal mapping relationship is obtained; including:
[0058] Dividing the operation record data into a number of similar operations according to the operation type;
[0059] Obtaining operation parameters and operation timestamps of a plurality of similar operations, and the system resource data affected respectively;
[0060] According to the influence relationship between the operation parameters and operation timestamps of the same type of operations on the system pressure, the normal mapping relationship is obtained;
[0061] Wherein, the normal mapping relationship is obtained according to the influence relationship between the operation parameters and operation timestamps of the same type of operations on the system pressure, further comprising:
[0062] Performing a first-level mapping according to the influence of the operation parameters and operation timestamp of a single operation of the same type on the system pressure, and obtaining a first-level mapping formula;
[0063] According to the impact of any two combinations of the same type of operations on the system pressure when they are performed concurrently, a secondary mixed mapping is performed to obtain a secondary mapping formula;
[0064] According to the impact of all the same operations on the system pressure when they are performed concurrently, a three-level hybrid mapping is performed to obtain a three-level mapping formula;
[0065] The primary mapping formula, the secondary mapping formula and the tertiary mapping formula are integrated to obtain a normal mapping relationship formula.
[0066] In one embodiment, it also includes:
[0067] The system resource data further includes: number of processes, response time, number of errors, and disk I / O rate;
[0068] According to the system resource data in the sporadic state, a correction factor formula is obtained, including:
[0069] Obtaining accidental state characteristics according to abnormal performance items of the system resource data in the accidental state, and determining the accidental state that the system is in;
[0070] According to the characteristics of the accidental state, a corresponding correction factor model is established to determine the influence of the accidental state on the system pressure. The correction factor formula based on which the correction factor model is constructed is:
[0071] F correction (S,Δ)=θ·(SS Threshold )+τ·g state (Δ)
[0072] ; Among them, F correction (S,Δ) is the correction factor; S is the current system pressure; S Thresholdis the normal threshold of system stress; θ is the occasional correction coefficient; Δ is the current occasional characteristic of the system state, including at least one of resource overrun, network interruption, high concurrency, disk damage, and memory fullness; g state (Δ) is the state influence function of the current accidental state, and the pressure is adjusted according to different accidental states; τ is the correction coefficient of the current accidental state influence function.
[0073] On the other hand, a pressure testing device for a cloud desktop is provided, the device comprising:
[0074] The log acquisition module is used to acquire system logs and operation logs, and obtain system resource data and operation record data;
[0075] A mapping processing module, used for performing mapping processing according to the system resource data and the operation record data to obtain a relationship between system pressure and test parameters; wherein the relationship between system pressure and test parameters includes a normal mapping relationship and a correction factor relationship;
[0076] A self-supervised learning large model module is used to receive the relationship between the system pressure and the test parameter, perform self-supervised learning, and obtain the fitted relationship between the system pressure and the test parameter;
[0077] A test parameter generation module is used to obtain the resource data to be tested according to the cloud desktop information to be tested, call the fitted relationship between the system pressure and the test parameter, and generate the guiding test parameters;
[0078] The test execution module calls the integrated test tool according to the guiding test parameters to perform the cloud desktop stress test.
[0079] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0080] Obtain system logs and operation logs, and obtain system resource data and operation record data;
[0081] According to the system resource data and the operation record data, mapping processing is performed to obtain a relationship between system pressure and test parameters; wherein the relationship between system pressure and test parameters includes a normal mapping relationship and a correction factor relationship;
[0082] The system pressure and test parameter relationship is fitted through large model self-supervised learning to obtain a fitted system pressure and test parameter relationship;
[0083] According to the cloud desktop information to be tested, the resource data to be tested is obtained, and the fitted system pressure and test parameter relationship formula is called to generate the guiding test parameters;
[0084] According to the guiding test parameters, call the integrated test tool to perform cloud desktop stress testing.
[0085] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0086] Obtain system logs and operation logs, and obtain system resource data and operation record data;
[0087] According to the system resource data and the operation record data, mapping processing is performed to obtain a relationship between system pressure and test parameters; wherein the relationship between system pressure and test parameters includes a normal mapping relationship and a correction factor relationship;
[0088] The system pressure and test parameter relationship is fitted through large model self-supervised learning to obtain a fitted system pressure and test parameter relationship;
[0089] According to the cloud desktop information to be tested, the resource data to be tested is obtained, and the fitted system pressure and test parameter relationship formula is called to generate the guiding test parameters;
[0090] According to the guiding test parameters, call the integrated test tool to perform cloud desktop stress testing.
[0091] The above-mentioned cloud desktop stress testing method, device, computer equipment and storage medium, by acquiring system resource data and operation record data, constructs a relationship between system pressure and test parameters, and through the combination of normal mapping relationship and correction factor, not only considers the system resource usage under normal conditions, but also further considers the state correction of system resources under occasional conditions such as high concurrency, thereby achieving a comprehensive simulation of the real load of the cloud desktop; further, the large model self-supervised learning technology is used to fit the relationship between system pressure and test parameters, which can automatically capture the law of system performance changing with test parameters, improve the accuracy of generated test parameters, thereby accurately reflecting the performance requirements under the current system state, and reflecting the changes in system performance in real time and dynamically; in addition, the present invention realizes the full automation from log acquisition to test parameter generation and then to stress test execution, thereby improving the degree of automation. At the same time, based on the fitted system pressure and test parameter relationship, the guiding test parameters are automatically generated, avoiding the tedious process of manually inputting operating parameters, and greatly improving the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 An application environment diagram of a stress testing method for simulating a cloud desktop in an embodiment;
[0093] Figure 2A schematic diagram of a process for simulating a stress test method for a cloud desktop in one embodiment;
[0094] Figure 3 A structural block diagram of a stress testing device for simulating a cloud desktop in an embodiment;
[0095] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0096] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0097] The cloud desktop stress testing method provided in this application can be applied to Figure 1 In the application environment shown. The terminal 102 communicates with the server 104 through the network. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server 104 is configured with a cloud desktop management system and a resource layer, which can be implemented with an independent server or a server cluster consisting of multiple servers.
[0098] In one embodiment, Figure 2 As shown, a cloud desktop stress testing method is provided, which is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:
[0099] Step 201, obtain system logs and operation logs, and obtain system resource data and operation record data.
[0100] The system resource data includes CPU resource data, memory resource data, disk resource data and bandwidth resource data; the operation record data includes: operation type, operation timestamp and operation parameters.
[0101] Step 202, mapping processing is performed according to the system resource data and the operation record data to obtain a relationship between system pressure and test parameters; wherein the relationship between system pressure and test parameters includes a normal mapping relationship and a correction factor relationship.
[0102] Among them, the system resource data is divided into normal state and occasional state, and the operation record data is also divided into normal state and occasional state accordingly; a normal mapping relationship is constructed based on the system resource data and operation record data under the normal state; and a correction factor formula is constructed based on the system resource data under the occasional state.
[0103] Step 203, fitting the relationship between system pressure and test parameters through large model self-supervised learning to obtain a fitted relationship between system pressure and test parameters.
[0104] Among them, the big model uses DoCS2KG as the big model framework, aiming to extract multimodal information from a variety of heterogeneous unstructured data sources; at the same time, the big model is fine-tuned: due to the diversity of data sources, multi-path processing is deleted, focusing on multi-modal unified processing to improve learning efficiency; in addition, the structural relationship of Docs2KG includes has-child, before and after, and the relationship of the present invention is only before and after. By reducing one layer of relationship, the learning efficiency is greatly improved.
[0105] Among them, the system log and operation log are continuously fed to DoCS2KG for inference learning, so as to adjust the influencing parameters and influencing functions in the relationship between system pressure and test parameters until the error between DoCS2KG's inference data and the existing system resource data and operation data is less than 0.05.
[0106] Step 204 , obtaining the resource data to be tested according to the cloud desktop information to be tested, calling the fitted system pressure and test parameter relationship formula, and generating the guiding test parameters.
[0107] Among them, according to the cloud desktop information to be tested, the target system pressure is obtained; according to the target system pressure, the relationship between system pressure and test parameters is called to generate guiding test parameters.
[0108] Step 205: Call the integrated testing tool according to the guiding test parameters to perform a cloud desktop stress test.
[0109] The integrated test tool is used to implement the same stress test on specific resources and specific resource utilization according to the guiding test parameters, so that the stress test meets the target system stress level. The integrated test tool includes: CPU test tool, preferably Cpulimit; memory test tool, preferably memtester; network test tool, preferably NetCat and Netperf; disk test tool, preferably dd.
[0110] In the above-mentioned cloud desktop stress testing method, by acquiring system resource data and operation record data, a relationship between system pressure and test parameters is constructed. By combining the normal mapping relationship with the correction factor, not only the system resource usage under normal conditions is considered, but also the state correction of system resources under occasional conditions such as high concurrency is further considered, thereby achieving a comprehensive simulation of the real load of the cloud desktop; further, the relationship between system pressure and test parameters is fitted using large model self-supervised learning technology, which can automatically capture the law of system performance changing with test parameters, improve the accuracy of generated test parameters, thereby accurately reflecting the performance requirements under the current system state, and reflecting the changes in system performance in real time and dynamically; in addition, the present invention realizes the full automation from log acquisition to test parameter generation and then to stress test execution, thereby improving the degree of automation. At the same time, based on the fitted system pressure and test parameter relationship, the guiding test parameters are automatically generated, and the stress test of specific scenarios can be performed as required, and the tedious process of manually inputting operating parameters is avoided, thereby greatly improving the test efficiency.
[0111] In one embodiment, mapping processing is performed based on system resource data and operation record data to obtain a relationship between system pressure and test parameters, including:
[0112] According to the system resource data, the system pressure is calculated to obtain the system pressure;
[0113] According to the system pressure, the system resource status is divided into normal state and occasional state, and the operation record data is divided into normal state and occasional state accordingly;
[0114] According to the system resource data in the normal state and the corresponding operation record data, a normal mapping relationship is obtained; according to the system resource data in the occasional state, a correction factor formula is obtained.
[0115] Specifically, this embodiment can more intuitively reflect the current resource status of the system by calculating the system pressure, so that the evaluation and optimization of system performance are more scientific and accurate; further, this embodiment divides the system resource status into normal state and occasional state, which helps to distinguish the system performance under normal operation and the system performance under abnormal conditions, thereby facilitating subsequent mapping processing, and realizing the accurate establishment of the relationship between system pressure and test parameters, which is conducive to the comprehensive simulation of real loads. At the same time, the separation of the normal mapping relationship and the correction factor relationship enables the system to flexibly adjust the test parameters when facing different pressure scenarios, thereby improving the adaptability and accuracy of the test.
[0116] In one embodiment, calling the fitted system pressure and test parameter relationship to generate the guiding test parameters includes:
[0117] According to the cloud desktop information to be tested, the resource data to be tested is obtained;
[0118] Calculate the system pressure to obtain the pressure of the system to be tested;
[0119] Based on the pressure of the system to be tested, the resource data to be tested is divided into a normal state and an occasional state;
[0120] When the resource data to be measured is in a normal state, the pressure of the system to be measured is the target pressure; when the resource data to be measured is in an occasional state, the pressure of the system to be measured is corrected according to the correction factor, and the corrected pressure of the system to be measured is used as the target pressure;
[0121] According to the target pressure, based on the normal mapping relationship, the guiding test parameters are generated.
[0122] Specifically, this embodiment can generate guiding test parameters in real time by calling the fitted relationship between system pressure and test parameters, provide immediate guidance for performance testing in cloud desktop simulation scenarios, and realize real-time reflection of system performance; further, according to the different states of the resource data to be tested, the system pressure is accurately adjusted to ensure the accuracy and effectiveness of the test parameters; in addition, the system pressure in the accidental state is corrected by the correction factor, which reduces the test errors caused by accidental events and improves the test efficiency and accuracy.
[0123] In one embodiment, the system resource data includes: CPU resource data, memory resource data, disk I / O resource data, and bandwidth resource data;
[0124] Based on the system resource data, the system pressure calculation includes:
[0125] According to the CPU resource data, the CPU impact value is obtained;
[0126] According to the memory resource data, the memory impact value is obtained;
[0127] According to the disk I / O resource data, the disk impact value is obtained;
[0128] According to the bandwidth resource data, a bandwidth impact value is obtained;
[0129] According to the CPU impact value, memory impact value, disk impact value and bandwidth impact value, the system pressure degree is obtained;
[0130] in,
[0131] The CPU impact value is calculated based on the CPU impact function. The CPU impact function is:
[0132]
[0133] Among them, f(tCPU ) is the CPU impact value, t CPU is the CPU utilization, a is the influence coefficient of linear growth, b is the influence coefficient of nonlinear growth, and c is the logarithmic term coefficient that controls the growth rate in the initial stage;
[0134] The memory impact value is obtained based on the memory impact function, which is:
[0135]
[0136] Among them, f(t Memory ) is the memory impact value, t Memory is the memory usage, d is the linear impact coefficient of memory, e is the nonlinear impact coefficient of memory; t MemThreshold is the memory usage threshold; (t Memory -t MemThreshold ) + is the ReLU function, which means that only the part of memory occupancy exceeding the occupancy threshold is considered; f and g are the linear and exponential amplification coefficients of the part of memory occupancy exceeding the occupancy threshold respectively;
[0137] The disk impact value is obtained based on the disk impact function, which is:
[0138]
[0139] Among them, f(Disk) is the disk impact value, IO disk is the disk I / O capacity, IO max is the maximum I / O capacity of the disk, represents the disk I / O utilization; h is the influence coefficient of the disk I / O logarithmic model, i is the influence coefficient of the disk I / O utilization, and j is the nonlinear influence coefficient of the disk I / O utilization;
[0140] The bandwidth impact value is obtained based on the bandwidth impact function, which is:
[0141]
[0142] Among them, f (Bandwidth) is the bandwidth impact value, Traffic is the network traffic, Bandwidth MAX is the maximum bandwidth, Indicates bandwidth utilization; k is the influence coefficient of bandwidth utilization, m is the nonlinear influence coefficient of bandwidth utilization, and n is the influence coefficient of bandwidth logarithmic model;
[0143] The system pressure is obtained based on the system pressure formula, which is:
[0144] S = α·f(t CPU)+β·f(t Memory )+γ·f(Disk)+δ·f(Bandwidth)
[0145] Where S is the system pressure, f(t CPU ) is the CPU impact value, f(t Memory ) is the memory impact value, f(Disk) is the disk impact value, and f(Bandwidth) is the bandwidth impact value; α, β, γ, and δ are the impact weights of CPU resources, memory resources, disk I / O resources, and bandwidth resources on system pressure, respectively;
[0146] It is worth noting that the initial values of the various influence coefficients and influence weights in this embodiment are set according to actual conditions, and then self-supervised learning, correction and fitting are performed through the large model.
[0147] Specifically, the calculation of system pressure in this embodiment comprehensively considers multiple aspects such as CPU, memory, disk I / O, bandwidth, etc., ensuring the comprehensiveness and accuracy of the calculation of system pressure; at the same time, by introducing different influence functions and weight coefficients, the influence of various resources is finely calculated, making the evaluation of system pressure more in line with the actual situation; in addition, the influence functions and weight coefficients of various resources can be adjusted according to actual needs, improving the flexibility and adaptability of system pressure calculation
[0148] In one embodiment, according to the system pressure, the system resource state is divided into a normal state and an occasional state, and the operation record data is correspondingly divided into a normal state and an occasional state, including:
[0149] A normal threshold is set. When the system pressure is within the normal threshold, the system resource state is set to a normal state. When the system pressure is outside the normal threshold, the system resource state is set to an occasional state. The normal threshold is composed of the normal threshold, and the normal threshold includes: (0, normal threshold];
[0150] The setting of normal thresholds includes:
[0151] Obtain system resource data within a detection cycle and determine several evaluation indicators; wherein the several evaluation indicators include: CPU utilization, disk I / O utilization, bandwidth utilization, and memory occupancy;
[0152] According to several evaluation indicators, the evaluation threshold of the corresponding evaluation indicator is calculated based on the corresponding mean and standard deviation; the calculation formula of the evaluation threshold is: Threshold resource =μ resource +p×σ resource , where Threshold resource is the initial threshold of the current evaluation index, μ resourceis the mean of the current evaluation index, σ resource is the standard deviation of the current evaluation indicator; p is the capture constant, p is preferably 2-3, which is used to capture 95-98% of the data;
[0153] The evaluation thresholds of several evaluation indicators are combined to obtain the normal threshold;
[0154] The normal threshold is recalculated every several detection cycles;
[0155] Among them, the normal threshold is obtained based on the formula:
[0156] S Threshold =α×Threshold CPU +β×Threshold Memory +γ×Threshold Disk +δ×Threshold Bandwidth ; Among them, S Threshold is the normal threshold of system pressure, Threshold CPU 、Threshold Memory 、Threshold Disk 、Threshold Bandwidth They are the evaluation thresholds of CPU utilization, memory usage, disk I / O utilization, and bandwidth utilization. α, β, γ, and δ are the influence weights of CPU resources, memory resources, disk I / O resources, and bandwidth resources on system pressure.
[0157] Specifically, in this embodiment, through the setting and dynamic adjustment of normal thresholds, the system can automatically adjust the thresholds according to resource usage in different time periods, thereby improving the accuracy and timeliness of state division; and, by calculating the evaluation thresholds by mean and standard deviation, and adjusting them in combination with the capture constant, the stability and reliability of the normal thresholds are ensured.
[0158] In one of the embodiments, the operation record data includes: an operation timestamp, an operation type, and operation parameters;
[0159] System resource data further includes: CPU utilization, memory usage, disk I / O utilization, and bandwidth usage;
[0160] According to the system resource data in the normal state and the corresponding operation record data, a normal mapping relationship is obtained; including:
[0161] Divide the operation record data into several similar operations according to the operation type;
[0162] Obtain the operation parameters and operation timestamps of several similar operations, as well as the corresponding system resource data affected;
[0163] According to the influence relationship between the operation parameters and operation timestamps of several similar operations on the system pressure, a normal mapping relationship is obtained;
[0164] According to the influence of the operation parameters and operation timestamps of several similar operations on the system pressure, a normal mapping relationship is obtained, which further includes:
[0165] According to the influence of the operation parameters and operation timestamp of a single similar operation on the system pressure, a first-level mapping is performed to obtain a first-level mapping formula;
[0166] According to the impact of any two combinations of similar operations on the system pressure when they are performed concurrently, a two-level mixed mapping is performed to obtain a two-level mapping formula;
[0167] According to the impact of all similar operations on system pressure during concurrency, a three-level mixed mapping is performed to obtain a three-level mapping formula;
[0168] Integrate the first-level mapping formula, the second-level mapping formula and the third-level mapping formula to obtain the normal mapping relationship formula.
[0169] Among them, the construction of the first-level mapping includes:
[0170] Determine the operation type, which includes office operations, video surveillance operations, and scientific computing operations. Typical office operations include document editing, spreadsheet processing, and slideshow production, which usually have high requirements for CPU and memory, and also have certain requirements for bandwidth usage. Typical video surveillance operations include video stream processing, real-time monitoring, and video encoding and decoding, which consume a lot of bandwidth and memory, and also have certain requirements for disk reading speed. Typical scientific computing operations include modeling, simulation, and computational analysis, which occupy the largest amount of CPU and memory, and also have a significant impact on disk reading and writing.
[0171] Operation parameter definition: define a set of parameters for each operation type to describe its specific impact on system resources. System resources include: CPU, memory, disk, and bandwidth. Each set of operation parameters includes: CPU utilization, which reflects the CPU resource occupation of the operation; memory usage, which reflects the memory occupation of the operation; disk I / O times: reflects the I / O operations of the operation on the disk; bandwidth usage, which reflects the network bandwidth occupation of the operation.
[0172] Operation timestamp definition,The timestamp indicates the time when the operation occurred and its duration, which is particularly important in high-concurrency situations, because the concentration of operations in different time periods will affect the load of system resources.
[0173] A first-level mapping relationship is established to evaluate the contribution of each operation type to system resource pressure separately, thereby quantifying the impact of a single operation on system pressure;
[0174] Specifically, the operation parameters are vectorized to obtain the operation parameter vector X type , contains the various operation parameters of the operation type; and defines a parameter weight vector W for each operation type type ,The parameter weight vector contains the parameter weights corresponding to each operation parameter, which indicates the impact of each operation parameter on system resources, such as CPU, memory, disk, and bandwidth;
[0175] Vectorize the operation timestamp to get the timestamp vector T type , including the running time corresponding to each operation parameter; and defining a time weight vector V for each operation type type ,The time weight vector contains the time weight corresponding to the running time of each operation, which indicates the degree of impact of the running time of each operation parameter on the system resources;
[0176] Based on the operation parameter vector, parameter weight vector, timestamp vector, and time weight vector, the impact of each operation type on various system resources is obtained; according to the system pressure calculation in the previous article, α, β, Y, and δ are the impact weights of CPU resources, memory resources, disk I / O resources, and bandwidth resources on the system pressure, respectively. Combined with the impact of each operation on various system resources, the change in system pressure for each operation ΔS is obtained. type , including ΔS type1 , ΔS type2 , ΔS type3 .
[0177] Among them, the construction of the secondary mapping type includes:
[0178] A secondary mapping relationship is established to evaluate the mutual impact of two different operation types when they occur simultaneously, as well as the comprehensive impact on the system pressure level.
[0179] Specifically, we combine the operation types and select any two from office, video, and scientific computing to combine; we analyze the mutual influence of the combined operations and the resource competition of the combined operations, such as bandwidth competition and memory sharing, to obtain the mutual influence coefficient C. type1+type2 , C type1+type3 , C type2+type3 ; Combine the resource impact of the two operations and use the corresponding impact coefficient to adjust and get the change in system pressure caused by the combined operation, that is, ΔS type1+type2 , ΔS type1+type3 , ΔS type2+type3 .
[0180] Among them, the three-level mapping construction includes:
[0181] A three-level mapping relationship is established to evaluate the complex interactions when the three types of operations occur simultaneously.
[0182] Specifically, consider the resource competition relationship generated when the three operations are performed simultaneously; conduct a comprehensive impact analysis to evaluate the resource usage when the three are running simultaneously, especially the pressure during peak hours, and obtain the overall impact coefficient C all ; Combine the resource impact of the three operations and use the combined impact coefficient to obtain the change in system pressure ΔS of the three operations as a whole all .
[0183] Among them, the construction of the normal mapping relationship includes:
[0184] A normal mapping relationship is established to comprehensively consider the impact of all operation types and their combinations, and provide a comprehensive stress analysis of the system under various operation conditions.
[0185] Specifically, the first-level mapping formula of each operation type, the second-level mapping formula of any combination of two operation types, and the third-level mapping formula of three operations performed simultaneously are obtained respectively; wherein, the maximum pressure degree of the theoretical system is calculated based on the first-level mapping formula, that is, the operation parameters and timestamp parameters of the three operation types involved when they are executed at the maximum intensity are used as input, and the pressure upper limit value MaxS1 is obtained type1 、MaxS1 type2 、MaxS1 type3 , select the maximum value as the first level pressure upper limit S1 max Similarly, the maximum pressure of the theoretical system is calculated based on the secondary mapping formula and the tertiary mapping formula, and the secondary pressure upper limit S2 is obtained. max , and the third level pressure limit S3 max Among them, S1 max <S2 max <S3 max ; Finally, the normal mapping relationship is obtained, including the first-level mapping formula, the second-level mapping formula, the third-level mapping formula, and the first-level pressure upper limit, the second-level pressure upper limit, and the third-level pressure upper limit.
[0186] It is worth noting that, when calling, based on the target system pressure, a suitable mapping formula is selected as a mapping relationship reference formula to obtain the corresponding operation parameters and timestamp parameters as guiding test parameters; specifically, the target system pressure is recorded as S target , when S target ≤S1 max When S1 max <S target ≤S2max When S2 max <S target ≤S3 max When selecting the third-level mapping formula, the third-level mapping formula is selected as the reference formula for the mapping relationship.
[0187] Specifically, this embodiment can accurately establish a normal mapping relationship, thereby comprehensively reflecting the specific impact of different operation types and their combinations on the system stress, and provides a scientific basis for system performance evaluation and optimization; by constructing primary, secondary and tertiary mapping formulas, this embodiment realizes a full range of stress analysis from a single operation to multiple operations concurrently executed, which helps to deeply understand the performance of the system in different operation scenarios, thereby facilitating a comprehensive simulation of real loads; based on the normal mapping relationship, it is also possible to accurately predict and evaluate the occupancy of system resources by different operations, so as to formulate reasonable stress testing strategies and improve the accuracy and efficiency of stress testing; according to the size of the target system stress, this embodiment provides a flexible mapping relationship selection mechanism to ensure that accurate and reliable evaluation results can be obtained in different stress scenarios; in addition, through accurate system stress evaluation and reasonable resource allocation strategies, this embodiment helps to improve the stability and reliability of the system. When the cloud desktop environment needs to test high load or complex operation scenarios, it can timely issue warnings and take corresponding optimization measures to ensure that the system can continue to operate stably.
[0188] In one embodiment, the system resource data further includes: number of processes, response time, number of errors, disk I / O rate;
[0189] According to the system resource data under the occasional state, the correction factor formula is obtained, including:
[0190] According to the abnormal performance items of the system resource data in the accidental state, the accidental state characteristics are obtained to determine the accidental state of the system;
[0191] According to the characteristics of the accidental state, a corresponding correction factor model is established to determine the impact of the accidental state on the system pressure. The correction factor formula based on which the correction factor model is constructed is:
[0192] F correction (S, Δ) = θ·(SS Threshold )+T·g state (Δ)
[0193] ; Among them, F correction (S, Δ) is the correction factor; S is the current system pressure; S Thresholdis the normal threshold of system stress; θ is the occasional correction coefficient; Δ is the current occasional characteristic of the system state, including at least one of resource overrun, network interruption, high concurrency, disk damage, and memory fullness; g state (Δ) is the state influence function of the current accidental state, and the pressure is adjusted according to different accidental states; τ is the correction coefficient of the current accidental state influence function. The state influence function in this embodiment selects one of the exponential function, linear function, and log function according to actual conditions; each correction coefficient is input into the large model for self-supervised learning to achieve correction and fitting until it fits the existing system resource data performance.
[0194] Specifically, this embodiment enables the system to more comprehensively evaluate the performance status and improves the scalability of the stress test by further expanding the system resource data, such as the number of processes, response time, number of errors, disk I / O rate, etc.; and, for the abnormal performance items of system resource data under the occasional state, a corresponding correction factor model is established, which can accurately reflect the degree of influence of the occasional state on the system stress level, thereby accurately correcting the system stress level through the correction factor formula, reducing the test errors caused by accidental events, and improving the accuracy and reliability of the test; in addition, the setting of the correction factor formula also makes it possible to perform simulation tests of occasional states such as high concurrency, network disconnection, and disk failure during the test, which can further improve the comprehensiveness of the test.
[0195] It should be understood that although Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0196] In one embodiment, Figure 3 As shown, a stress testing device for a cloud desktop is provided, including: a log acquisition module, a mapping processing module, a self-supervised learning large model module, a test parameter generation module and a test execution module, wherein:
[0197] The log acquisition module is used to acquire system logs and operation logs, and obtain system resource data and operation record data;
[0198] A mapping processing module is used to perform mapping processing according to the system resource data and the operation record data to obtain a relationship between the system pressure and the test parameter; wherein the relationship between the system pressure and the test parameter includes a normal mapping relationship and a correction factor;
[0199] The self-supervised learning large model module is used to receive the relationship between system pressure and test parameters, perform self-supervised learning, and obtain the fitted relationship between system pressure and test parameters;
[0200] The test parameter generation module is used to obtain the resource data to be tested according to the cloud desktop information to be tested, call the fitted system pressure and test parameter relationship formula, and generate the guiding test parameters;
[0201] The test execution module calls the integrated test tool to perform cloud desktop stress testing according to the guided test parameters.
[0202] In one embodiment, the log acquisition module is used to acquire system logs and operation logs to obtain system resource data and operation record data; wherein the system resource data includes CPU resource data, memory resource data, disk resource data and bandwidth resource data; the operation record data includes: operation type, operation timestamp, and operation parameters.
[0203] In one embodiment, the mapping processing module is used to perform mapping processing according to the system resource data and the operation record data to obtain a relationship between the system pressure and the test parameter.
[0204] The mapping processing module is also used to calculate the system pressure degree according to the system resource data to obtain the system pressure degree; wherein, the CPU impact value is obtained according to the CPU resource data; the memory impact value is obtained according to the memory resource data; the disk impact value is obtained according to the disk I / O resource data; the bandwidth impact value is obtained according to the bandwidth resource data; and the system pressure degree is obtained according to the CPU impact value, the memory impact value, the disk impact value and the bandwidth impact value.
[0205] The mapping processing module is also used to divide the system resource status into normal state and occasional state according to the system pressure degree, and to divide the operation record data into normal state and occasional state accordingly, including: setting a normal threshold, when the system pressure degree is within the normal threshold, setting the system resource status to the normal state, when the system pressure degree is outside the normal threshold, setting the system resource status to the occasional state.
[0206] The mapping processing module is also used to obtain a normal mapping relationship based on the system resource data and the corresponding operation record data in the normal state, including: dividing the operation record data into several similar operations according to the operation type; obtaining the operation parameters and operation timestamps of several similar operations, and the corresponding system resource data affected respectively; obtaining the normal mapping relationship based on the influence relationship between the operation parameters and operation timestamps of several similar operations on the system pressure.
[0207] The mapping processing module is also used to obtain a correction factor formula based on the system resource data in the sporadic state, including: obtaining the sporadic state characteristics based on the abnormal performance items of the system resource data in the sporadic state, and determining the sporadic state the system is in; according to the sporadic state characteristics, establishing a corresponding correction factor model to determine the degree of influence of the sporadic state on the system pressure.
[0208] In one embodiment, the self-supervised learning big model module is used to receive the relationship between system pressure and test parameters for fitting, and fit the relationship between system pressure and test parameters through big model self-supervised learning; wherein, the big model uses DoCS2KG as the big model framework, aiming to extract multimodal information from a variety of heterogeneous unstructured data sources; in addition, it is also used to receive system logs and operation logs for inference learning, so as to adjust the influencing parameters and influencing functions in the relationship between system pressure and test parameters, until the error between DoCS2KG's inference data and the existing system resource data and operation data is less than 0.05.
[0209] In one embodiment, the test parameter generation module is used to call the fitted system pressure and test parameter relationship to generate guidance test parameters; obtain the resource data to be tested according to the cloud desktop information to be tested; perform system pressure calculation to obtain the system pressure to be tested; divide the resource data to be tested into normal state and occasional state based on the system pressure to be tested; wherein, when the resource data to be tested is in the normal state, the system pressure to be tested is the target pressure; when the resource data to be tested is in the occasional state, the system pressure to be tested is corrected according to the correction factor formula, and the corrected system pressure to be tested is used as the target pressure; according to the target pressure, based on the normal mapping relationship, generate guidance test parameters.
[0210] In one embodiment, the test execution module is used to call the integrated testing tool and implement the same stress test on specific resources and specific resource utilization according to the guiding test parameters, so that the stress test meets the target system stress level; wherein the integrated testing tool includes: a CPU testing tool, preferably Cpulimit; a memory testing tool, preferably memtester; a network testing tool, preferably NetCat and Netperf; and a disk testing tool, preferably dd.
[0211] For the specific definition of a cloud desktop stress testing device, please refer to the definition of a cloud desktop stress testing method above, which will not be repeated here. Each module in the above-mentioned cloud desktop stress testing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0212] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store system logs and operation logs. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a cloud desktop stress testing method is implemented.
[0213] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0214] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0215] Obtain system logs and operation logs, and obtain system resource data and operation record data;
[0216] According to the system resource data and the operation record data, mapping processing is performed to obtain a relationship between system pressure and test parameters; wherein the relationship between system pressure and test parameters includes a normal mapping relationship and a correction factor relationship;
[0217] Through large-model self-supervised learning, the relationship between system pressure and test parameters is fitted to obtain the fitted relationship between system pressure and test parameters;
[0218] According to the cloud desktop information to be tested, the resource data to be tested is obtained, and the fitted system pressure and test parameter relationship formula is called to generate the guiding test parameters;
[0219] According to the guided test parameters, call the integrated test tool to perform cloud desktop stress testing.
[0220] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0221] Obtain system logs and operation logs, and obtain system resource data and operation record data;
[0222] According to the system resource data and the operation record data, mapping processing is performed to obtain a relationship between system pressure and test parameters; wherein the relationship between system pressure and test parameters includes a normal mapping relationship and a correction factor relationship;
[0223] Through large-model self-supervised learning, the relationship between system pressure and test parameters is fitted to obtain the fitted relationship between system pressure and test parameters;
[0224] According to the cloud desktop information to be tested, the resource data to be tested is obtained, and the fitted system pressure and test parameter relationship formula is called to generate the guiding test parameters;
[0225] According to the guided test parameters, call the integrated test tool to perform cloud desktop stress testing.
[0226] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0227] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0228] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A cloud desktop stress testing method, characterized in that: include: Obtain system logs and operation logs, and obtain system resource data and operation record data; According to the system resource data and the operation record data, mapping processing is performed to obtain a relationship between system pressure and test parameters; wherein the relationship between system pressure and test parameters includes a normal mapping relationship and a correction factor relationship; The system pressure and test parameter relationship is fitted through large model self-supervised learning to obtain a fitted system pressure and test parameter relationship; According to the cloud desktop information to be tested, the resource data to be tested is obtained, and the fitted relationship between the system pressure and the test parameter is called to generate the guiding test parameters; According to the guiding test parameters, call the integrated test tool to perform cloud desktop stress testing.
2. A cloud desktop stress testing method according to claim 1, characterized in that: According to the system resource data and the operation record data, mapping processing is performed to obtain a relationship between system pressure and test parameters, including: Calculating the system pressure according to the system resource data to obtain the system pressure; According to the system pressure, the system resource state is divided into a normal state and an occasional state, and the operation record data is correspondingly divided into a normal state and an occasional state; A normal mapping relationship is obtained based on the system resource data in a normal state and the corresponding operation record data; and a correction factor is obtained based on the system resource data in an occasional state.
3. A cloud desktop stress testing method according to claim 2, characterized in that: The fitted relationship between the system pressure and the test parameter is called to generate the guiding test parameter, including: According to the cloud desktop information to be tested, the resource data to be tested is obtained; Calculate the system pressure to obtain the pressure of the system to be tested; Dividing the resource data to be tested into a normal state and an occasional state based on the pressure level of the system to be tested; When the resource data to be measured is in a normal state, the pressure of the system to be measured is the target pressure; when the resource data to be measured is in an occasional state, the pressure of the system to be measured is corrected according to the correction factor, and the corrected pressure of the system to be measured is used as the target pressure; According to the target pressure level and based on the normal mapping relationship, a guiding test parameter is generated.
4. A cloud desktop stress testing method according to claim 2, characterized in that: The system resource data includes: CPU resource data, memory resource data, disk I / O resource data, and bandwidth resource data; Calculating the system pressure according to the system resource data includes: Obtaining a CPU impact value according to the CPU resource data; Obtaining a memory impact value according to the memory resource data; Obtaining a disk impact value according to the disk I / O resource data; Obtaining a bandwidth impact value according to the bandwidth resource data; Obtaining a system pressure degree according to the CPU impact value, the memory impact value, the disk impact value, and the bandwidth impact value; in, The CPU impact value is calculated based on the CPU impact function, and the CPU impact function is: Among them, f(t CPU ) is the CPU impact value, t CPU is the CPU utilization, a is the coefficient of linear growth, b is the coefficient of nonlinear growth, and c is the coefficient of the logarithmic term that controls the growth rate in the initial stage; The memory impact value is obtained based on a memory impact function, and the memory impact function is: Among them, f(t Memory ) is the memory impact value, t Memory is the memory usage, d is the linear impact coefficient of memory, e is the nonlinear impact coefficient of memory; t MemThreshold is the memory usage threshold; (t Memory -t MemThreshold ) + is the ReLU function, which means that only the part of memory occupancy exceeding the occupancy threshold is considered; f and g are the linear and exponential amplification coefficients of the part of memory occupancy exceeding the occupancy threshold respectively; The disk impact value is obtained based on the disk impact function, and the disk impact function is: Among them, f(Disk) is the disk impact value, IO disk is the disk I / O capacity, IO max is the maximum I / O capacity of the disk, represents the disk I / O utilization; h is the influence coefficient of the disk I / O logarithmic model, i is the influence coefficient of the disk I / O utilization, and j is the nonlinear influence coefficient of the disk I / O utilization; The bandwidth impact value is obtained based on a bandwidth impact function, and the bandwidth impact function is: Among them, f (Bandwidth) is the bandwidth impact value, Traffic is the network traffic, Bandwidth MAX is the maximum bandwidth, Indicates bandwidth utilization; k is the influence coefficient of bandwidth utilization, m is the nonlinear influence coefficient of bandwidth utilization, and n is the influence coefficient of bandwidth logarithmic model; The system pressure is obtained based on the system pressure formula, which is: S=α·f(t CPU )+β·f(t Memory )+γ·f(Disk)+δ·f(Bandwidth) Where S is the system pressure, f(t CPU ) is the CPU impact value, f(t Memory ) is the memory impact value, f(Disk) is the disk impact value, and f(Bandwidth) is the bandwidth impact value; α, β, γ, and δ are the impact weights of CPU resources, memory resources, disk I / O resources, and bandwidth resources on system pressure, respectively.
5. A cloud desktop stress testing method according to claim 2, characterized in that: According to the system pressure, the system resource state is divided into a normal state and an occasional state, and the operation record data is correspondingly divided into a normal state and an occasional state, including: A normal threshold is set. When the system pressure is within the normal threshold, the system resource state is set to a normal state. When the system pressure is outside the normal threshold, the system resource state is set to an occasional state. The setting of normal thresholds includes: Obtain the system resource data within a detection cycle and determine several evaluation indicators; wherein the several evaluation indicators include: CPU utilization, disk I / O utilization, bandwidth utilization, and memory occupancy; According to several evaluation indicators, the evaluation threshold of the corresponding evaluation indicator is calculated based on the corresponding mean and standard deviation; the calculation formula of the evaluation threshold is: Threshold resource =μ resource +p×σ resource , where Threshold resource is the initial threshold of the current evaluation index, μ resource is the mean of the current evaluation index, σ resource is the standard deviation of the current evaluation index, and p is the capture constant; The evaluation thresholds of several evaluation indicators are combined to obtain the normal threshold; The normal threshold is recalculated every several detection cycles; Among them, the normal threshold is obtained based on the formula: S Threshold =α×Threshold CPU +β×Threshold Memory +γ×Threshold Disk +δ×Threshold Bandwidth ; Among them, S Threshold is the normal threshold of system pressure, Threshold CPU 、Threshold Memory 、Threshold Disk 、Threshold Bandwidth They are the evaluation thresholds of CPU utilization, memory usage, disk I / O utilization, and bandwidth utilization. α, β, γ, and δ are the influence weights of CPU resources, memory resources, disk I / O resources, and bandwidth resources on system pressure.
6. A cloud desktop stress testing method according to claim 4, characterized in that: The operation record data includes: operation timestamp, operation type, and operation parameters; The system resource data further includes: CPU utilization, memory occupancy, disk I / O utilization, and bandwidth utilization; According to the system resource data in the normal state and the corresponding operation record data, a normal mapping relationship is obtained; including: Dividing the operation record data into a number of similar operations according to the operation type; Obtaining operation parameters and operation timestamps of a plurality of similar operations, and the system resource data affected respectively; According to the influence relationship between the operation parameters and operation timestamps of the same type of operations on the system pressure, the normal mapping relationship is obtained; Wherein, the normal mapping relationship is obtained according to the influence relationship between the operation parameters and operation timestamps of the same type of operations on the system pressure, further comprising: Performing a first-level mapping according to the influence of the operation parameters and operation timestamp of a single operation of the same type on the system pressure, and obtaining a first-level mapping formula; According to the impact of any two combinations of the same type of operations on the system pressure when they are performed concurrently, a secondary mixed mapping is performed to obtain a secondary mapping formula; According to the impact of all the same operations on the system pressure when they are performed concurrently, a three-level hybrid mapping is performed to obtain a three-level mapping formula; The primary mapping formula, the secondary mapping formula and the tertiary mapping formula are integrated to obtain a normal mapping relationship formula.
7. A cloud desktop stress testing method according to claim 6, characterized in that: The system resource data further includes: number of processes, response time, number of errors, and disk I / O rate; According to the system resource data in the sporadic state, a correction factor formula is obtained, including: Obtaining the accidental state characteristics according to the abnormal performance items of the system resource data in the accidental state, and determining the accidental state that the system is in; According to the characteristics of the accidental state, a corresponding correction factor model is established to determine the influence of the accidental state on the system pressure. The correction factor formula based on which the correction factor model is constructed is: F correction (S,Δ)=θ·(SS Threshold )+τ·g state (D) Among them, F correction (S,Δ) is the correction factor; S is the current system pressure; S Threshold is the normal threshold of system stress; θ is the occasional correction coefficient; Δ is the current occasional characteristic of the system state, including at least one of resource overrun, network interruption, high concurrency, disk damage, and memory fullness; g state (Δ) is the state influence function of the current accidental state, and the pressure is adjusted according to different accidental states; τ is the correction coefficient of the current accidental state influence function.
8. A pressure testing device for a cloud desktop, characterized in that: The device comprises: The log acquisition module is used to acquire system logs and operation logs, and obtain system resource data and operation record data; A mapping processing module, used for performing mapping processing according to the system resource data and the operation record data to obtain a relationship between system pressure and test parameters; wherein the relationship between system pressure and test parameters includes a normal mapping relationship and a correction factor relationship; A self-supervised learning large model module is used to receive the relationship between the system pressure and the test parameter, perform self-supervised learning, and obtain the fitted relationship between the system pressure and the test parameter; A test parameter generation module is used to obtain the resource data to be tested according to the cloud desktop information to be tested, call the fitted relationship between the system pressure and the test parameter, and generate the guiding test parameters; The test execution module calls the integrated test tool according to the guiding test parameters to perform the cloud desktop stress test.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
