Business system stress test method, apparatus, device, and storage medium
By intercepting and identifying inbound traffic to the business system and creating a resource pool, the problem of isolating stress test traffic from real user traffic was solved, improving stress test efficiency and alleviating the stress load on the business system.
Patent Information
- Application Number
- CN202311628909.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-11-30
AI Technical Summary
Existing technologies fail to effectively isolate stress test traffic from real user traffic, leading to data contamination and significant stress load on normal business traffic of business systems.
By intercepting and identifying the inbound traffic of the business system, the load testing traffic is determined, and a resource pool is created based on the peak trend value of the business volume. The load testing traffic is then allocated to the resource pool for load testing.
It achieves isolation between stress test traffic and real user traffic, avoids data pollution, improves stress test efficiency, and alleviates the normal business traffic pressure load of the business system.
Smart Images

Figure CN118827476B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of pressure testing, in particular to a business system pressure testing method, device, equipment and storage medium. BACKGROUND
[0002] In recent years, with the development of mobile internet, internet of things and 5G communication technology, the digital wave is coming, and digitalization is finally landed through a series of software systems. The software system is becoming more and more huge, and the user quantity is becoming more and more large, so the previous simple pressure testing method cannot be used to correspond to the coming flood flow. When the production pressure test is carried out, the pressure test data is read and written into the real table, and the real user data and the pressure test data are not isolated, so the pressure test data may be accessed by the real user, which causes the user to be disturbed. In the pressure test process, the real data is easily polluted, the data recovery work is difficult, and the test data and the real data are not isolated, so the resources for the pressure test flow cannot be accurately provided, which causes the pressure test process to cause great pressure load to the normal business flow of the business system.
[0003] The above content is only used to assist in understanding the technical solutions of the present application, and does not represent the acknowledgement of the above content as prior art. SUMMARY
[0004] The main purpose of the present application is to provide a business system pressure testing method, device, equipment and storage medium, which aims to solve the technical problem that the prior art does not isolate the flow, which causes data pollution and great pressure load to the normal business flow of the business system.
[0005] To achieve the above purpose, the present application provides a business system pressure testing method, which comprises the following steps:
[0006] The entrance flow of the business system is intercepted and identified, and the pressure test flow in the entrance flow is determined;
[0007] Obtain the business volume peak trend value of the business system;
[0008] Create a resource pool based on the business volume peak trend value;
[0009] The pressure test flow is distributed to the resource pool, and the business system is pressure tested.
[0010] Optionally, the business volume peak trend value of the business system is obtained, comprising:
[0011] The business system is monitored to obtain the business volume data of the business system;
[0012] The trend of the business system is predicted based on the business volume data to obtain an initial trend value;
[0013] adjusting weights of each index in the service volume data;
[0014] correcting the initial trend value based on the adjusted index weight to obtain a service volume peak trend value.
[0015] Optionally, the creating a resource pool based on the service volume peak trend value comprises:
[0016] monitoring resources of the business system to obtain a current resource utilization rate of the business system;
[0017] judging whether the current resource utilization rate exceeds a critical threshold based on the service volume peak trend value;
[0018] creating a resource pool based on the service volume peak trend value when the current resource utilization rate exceeds the critical threshold.
[0019] Optionally, before the judging whether the current resource utilization rate exceeds a critical threshold based on the service volume peak trend value, the method further comprises:
[0020] determining a resource elasticity parameter of the business system based on the current resource utilization rate;
[0021] obtaining a resource capacity parameter of the business system;
[0022] determining a critical threshold based on the resource capacity parameter and the resource elasticity parameter.
[0023] Optionally, the determining a critical threshold based on the resource capacity parameter and the resource elasticity parameter comprises:
[0024] performing resource occupation scoring on the business system based on the resource elasticity parameter to obtain a resource occupation score;
[0025] performing business trend scoring on the business system based on the service volume peak trend value to obtain a business trend score;
[0026] performing weight ratio calculation on the resource occupation score and the business trend score to obtain a critical ratio.
[0027] Optionally, the creating a resource pool based on the service volume peak trend value comprises:
[0028] extracting original data from a database of the business system;
[0029] performing feature extraction on the original data to obtain an abstract feature vector;
[0030] performing feature interaction on the abstract feature vector to obtain a feature interaction vector;
[0031] determine a resource pool quantity based on the feature interaction vector and the traffic peak trend value;
[0032] create at least one resource pool based on the resource pool quantity.
[0033] Optionally, the determining the resource pool quantity based on the feature interaction vector and the traffic peak trend value comprises:
[0034] inputting the feature interaction vector into a pre-constructed feature classification model to obtain a classification result;
[0035] extracting an explicit feature vector and an implicit feature vector from a data file of the database based on the classification result;
[0036] determining a joint feature vector based on the explicit feature vector and the implicit feature vector;
[0037] inputting the joint feature vector into a pre-constructed classification model to obtain a classification result;
[0038] determining a feature vector recall rate based on the classification result;
[0039] determining a resource pool quantity according to the feature vector recall rate and the traffic peak trend value.
[0040] In addition, to achieve the above object, the application further provides a business system stress testing device, which comprises:
[0041] a flow identification module, configured to intercept and identify an entrance flow of a business system, and determine a stress testing flow in the entrance flow;
[0042] a trend calculation module, configured to obtain a traffic peak trend value of the business system;
[0043] a resource pool construction module, configured to create a resource pool based on the traffic peak trend value;
[0044] a stress testing module, configured to distribute the stress testing flow to the resource pool, and perform stress testing on the business system.
[0045] In addition, to achieve the above object, the application further provides a business system stress testing device, which comprises a memory, a processor, and a business system stress testing program stored in the memory and capable of running on the processor, and the business system stress testing program is configured to implement the steps of the business system stress testing method as described above.
[0046] In addition, to achieve the above object, the application further provides a storage medium, wherein the storage medium stores a business system stress test program, and the business system stress test program is executed by a processor to implement the steps of the business system stress test method.
[0047] The application determines the stress test flow in the entrance flow of the business system by intercepting and identifying the entrance flow, acquires the business volume peak trend value of the business system, creates a resource pool based on the business volume peak trend value, allocates the stress test flow to the resource pool, and performs stress test on the business system. Since the application first intercepts and identifies the entrance flow of the business system, the stress test flow is isolated from the real user flow, the flow data pollution is effectively avoided, the stress test flow in the entrance flow is allocated to the resource pool based on the business volume peak trend value of the business system, the dynamic allocation of resources is realized, the stress test efficiency of the business system is effectively improved by allocating the resource pool to the stress test flow, and the pressure load of the normal business flow of the business system is effectively relieved. BRIEF DESCRIPTION OF DRAWINGS
[0048] Figure 1 is a structural schematic diagram of a business system stress test device of a hardware running environment related to the embodiment scheme of the application;
[0049] Figure 2 is a flow schematic diagram of a first embodiment of the business system stress test method of the application;
[0050] Figure 3 is a flow interception and identification schematic diagram of the first embodiment of the business system stress test method of the application;
[0051] Figure 4 is a flow schematic diagram of a second embodiment of the business system stress test method of the application;
[0052] Figure 5 is a data volume schematic diagram of the second embodiment of the business system stress test method of the application;
[0053] Figure 6 is a data trend schematic diagram of the second embodiment of the business system stress test method of the application;
[0054] Figure 7 is a data performance schematic diagram of the second embodiment of the business system stress test method of the application;
[0055] Figure 8 is a flow schematic diagram of a third embodiment of the business system stress test method of the application;
[0056] Figure 9The residual unit structure optimization comparison schematic diagram of the third embodiment of the service system stress test method of the application;
[0057] Figure 10 The structural block diagram of the first embodiment of the service system stress test device of the application.
[0058] The implementation, functional features and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0059] It should be understood that the specific embodiments described herein are merely intended to explain the application and are not intended to limit the application.
[0060] Referring to Figure 1 , Figure 1 The service system stress test device structure schematic diagram of the hardware running environment involved in the embodiment scheme of the application.
[0061] As Figure 1 shown, the service system stress test device can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display screen, an input unit such as a keyboard, and an optional user interface 1003 can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 can be a high-speed random access memory (RAM), and can also be a stable non-volatile memory (NVM), such as a disk memory. The memory 1005 can also be an independent storage device from the aforementioned processor 1001.
[0062] Those skilled in the art can understand that Figure 1 the structure shown in the foregoing embodiments does not constitute a limitation on the service system stress test device, and can include more or fewer components than the illustrated components, or combine certain components, or different component arrangements.
[0063] As Figure 1 shown, the memory 1005 as a storage medium can include an operating system, a network communication module, a user interface module, and a service system stress test program.
[0064] In Figure 1The network interface 1004 shown in the business system stress test equipment is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the business system stress test equipment of the application can be arranged in the business system stress test equipment, and the business system stress test equipment calls the business system stress test program stored in the memory 1005 through the processor 1001, and executes the business system stress test method provided in the embodiment of the application.
[0065] The embodiment of the application provides a business system stress test method, which refers to Figure 2 , Figure 2 The embodiment of the application provides a business system stress test method, which refers to
[0066] In the embodiment, the business system stress test method comprises the following steps:
[0067] Step S10: The entry flow of the business system is intercepted and identified to determine the stress test flow in the entry flow.
[0068] It should be noted that when the production stress test is performed, the stress test data is read and written into the real table, and the real user data and the stress test data are not isolated. The stress test data may be accessed by the real user, which causes disturbance to the user; during the stress test process, the real data is easily polluted, and the data recovery work is difficult; after the stress test is completed, it is difficult to clean the stress test data, for example, if the data of the real table is very large, more than 5 million records, at this time, the stress test data needs to be cleaned, and an additional index needs to be added for cleaning. The modified system to identify the stress test flow means that the related codes of the system related to data reading and storage need to judge whether the current parameter is the stress test flow or the normal flow. For the business system, the workload is huge.
[0069] It should be understood that the execution subject of the embodiment method can be a business system stress test equipment with data processing, network communication and program running functions, such as a computer or other devices or equipment capable of realizing the same or similar functions, which are taken as examples of the above-mentioned business system stress test equipment (hereinafter referred to as stress test equipment) for description.
[0070] It should be noted that the entry flow can be the flow at the entrance of the business system, and the stress test equipment in the embodiment intercepts the flow at the entrance of the business system, identifies the intercepted flow, and determines the stress test flow and the normal business flow (i.e. real flow) in the entry flow.
[0071] Understandably, load testing equipment can incorporate a traffic identification and interception module at the entry point of the business system. This module judges and verifies traffic request tags. When traffic passing through the business system is not marked with "true", the interception device determines the traffic as normal traffic and uses a routing algorithm to reuse the existing business thread pool. During SQL requests, data from normal traffic is placed into the real database table. When traffic from the production system is marked with "true", the traffic identification and interception module determines it as load testing traffic.
[0072] In the specific implementation, refer to Figure 3 , Figure 3 This diagram illustrates traffic interception and identification. The load testing equipment provides a traffic identification and interception device, which includes a Java agent program called DJYagent that supports the identification of HTTP load testing traffic requests. The Java agent enhances Java bytecode to identify whether the HTTP traffic entering the Java service is production traffic or load testing traffic. If it is identified as load testing traffic, DJYagent reads or writes the load testing traffic data to the load testing database table.
[0073] DJYagent is primarily designed to reduce redundant code, improve performance, and isolate traffic during forwarding.
[0074] Secondly, in this embodiment, when starting the application in a user login system developed in Java, the Javaagent parameter java user.jar-javaagent:DJYagent.jar is added for identification and interception of traffic during stress testing.
[0075] Specifically, when a business system receives one or more normal HTTP requests, such as the URL --header http: / / www.pay.com / user / createuser-XPOST-F'username="USER1"'-F'password="PASSWORD"', DJYagent will identify and intercept these normal production traffic as it flows and is routed within the business system, determining the load test traffic label (--header"X-PerTest").
[0076] Specifically, when a user initiates an HTTP request with load testing traffic from the load testing system, construct an HTTP request with load testing traffic flag (--header "X-PerTest:true").
[0077] The traffic identification and interception device judges the traffic as pressure test traffic (i.e., --header "X-PerTest:true").
[0078] Step S20: Obtain the service volume peak trend value of the service system.
[0079] It should be noted that the production traffic and the pressure test traffic flowing into the service system will consume and occupy various resources of the current platform system, such as the occupancy rate of network bandwidth, the consumption of server resources (CPU usage rate, memory usage rate), the write rate of database disk, the refresh frequency of database disk, and the like. Therefore, the embodiment can obtain the service volume peak trend value of the service system by monitoring the fluctuation value of the user service volume data of the service system.
[0080] Step S30: Create a resource pool based on the service volume peak trend value.
[0081] It should be noted that the resource pool can be a dynamic thread pool, and the pressure test device can create one or more resource pools to alleviate the pressure load of the normal business traffic of the service system.
[0082] In a specific implementation, the pressure test device judges whether a resource pool needs to be created, compares the service volume peak trend value of the current service system with the real-time resource usage rate, and if the current resource usage rate exceeds a critical threshold value, it is determined that a resource pool needs to be created to alleviate the resource pressure of the normal business traffic of the service system, and the resource pool is created.
[0083] Further, in order to timely alleviate the resource load pressure of the service system, the above step S30 can include:
[0084] Step S31: Perform resource monitoring on the service system to obtain the current resource utilization rate of the service system.
[0085] Step S32: Judge whether the current resource utilization rate exceeds a critical threshold value based on the service volume peak trend value.
[0086] Step S33: Create a resource pool based on the service volume peak trend value when the current resource utilization rate exceeds the critical threshold value.
[0087] It can be understood that the stress testing device can calculate the current traffic peak trend value by a smooth exponential weighted moving average algorithm, compare the current traffic peak trend value of the business system with the real-time resource utilization, if the current resource utilization exceeds the critical threshold, then start and enable the use of the dynamic thread pool, at the same time collect the peak traffic fluctuation data and accurately match through the intelligent recommendation self-developed algorithm, and then create one or more real-time dynamic resource pools matching the peak traffic fluctuation through Java SDKExecutors.newFixedThreadPool.
[0088] Further, in order to accurately calculate the critical threshold, the above step S32 can include:
[0089] determining a resource elasticity parameter of the business system based on the current resource utilization;
[0090] obtaining a resource capacity parameter of the business system;
[0091] determining a critical threshold based on the resource capacity parameter and the resource elasticity parameter.
[0092] It can be understood that the embodiment starts the use of the thread pool resource by scoring the traffic data and the resource utilization, and the following formula is referred to, wherein R_resource is the real-time machine resource utilization. The formula evaluates the resource elasticity by calculating the difference between the real-time machine resource utilization and 1. The lower the utilization, the higher the elasticity of the system resource.
[0093] R_score = 1 - R_resource
[0094] It should be understood that the stress testing device sets the index weight and threshold value for determining whether to use an independent resource pool according to the traffic trend and the machine resource condition, and calculates the critical threshold according to the score of the traffic trend and the CPU resource condition.
[0095] Further, in order to accurately determine whether to start an independent resource pool for resource allocation, the above determination of the critical threshold based on the resource capacity parameter and the resource elasticity parameter includes:
[0096] performing resource occupation scoring on the business system based on the resource elasticity parameter to obtain a resource occupation score;
[0097] performing business trend scoring on the business system based on the traffic peak trend value to obtain a business trend score;
[0098] performing weight ratio calculation on the resource occupation score and the business trend score to obtain a critical ratio.
[0099] It should be noted that the critical threshold is calculated with reference to the following formula, wherein N tp is the critical threshold, f() is a function for calculating the critical proportion according to the traffic trend score and the resource utilization score, and N max is a preset maximum capacity of resource usage.
[0100] N tp = f(T b_score, R resource_score) * N max
[0101] f(T b_score, R resource_score) = min(T b_score; R resource_score)
[0102] In a specific implementation, taking the occupancy rate of network bandwidth, CPU utilization rate, and memory usage rate as examples: the network bandwidth occupancy rate is 75%, the CPU utilization rate is 78%, and the memory usage rate is 80%, the network bandwidth occupancy rate is 0.25 points, the CPU utilization rate score is 0.22 points, and the memory utilization rate score is 0.20 points. The lower the score, the higher the resource utilization of the current system. Similarly, according to the f() function for scoring the traffic trend and the current resource utilization score for scoring the resource, the critical threshold proportion is calculated, and the weight proportion of the traffic trend value and the resource utilization rate is calculated through the f() function, the trend value weight accounts for 70%, and the resource utilization rate weight accounts for 30%. Through the score weight calculation, if the result is greater than the critical threshold, the independent thread pool is started.
[0103] It should be noted that the load testing device is based on the above process, and in actual business, the algorithm innovation of combining the traffic trend and the load testing flow of machine resources is used to select the independent thread pool, so as to achieve the purpose of maximizing the utilization of resources and improve the load testing efficiency and accuracy.
[0104] Step S40: distributing the load testing flow to the resource pool and performing pressure testing on the business system.
[0105] It should be noted that after the load testing device creates the resource pool, the pressure of normal business flow is relieved and shared through the execution of the independent thread pool usage queue, and the load testing flow with a load testing mark accurately flows into the load testing database table.
[0106] The embodiment determines the stress test traffic in the entry traffic of the business system through intercepting and identifying the entry traffic, obtains the business volume peak trend value of the business system, creates a resource pool based on the business volume peak trend value, allocates the stress test traffic to the resource pool, and performs stress test on the business system. Since the embodiment realizes isolation of the stress test traffic and the real user traffic by first intercepting and identifying the entry traffic of the business system, effectively avoids traffic data pollution, creates a resource pool based on the business volume peak trend value of the business system, allocates the stress test traffic in the entry traffic to the resource pool, realizes dynamic allocation of resources, and allocates the resource pool to the stress test traffic, thereby effectively improving the stress test efficiency of the business system and effectively relieving the pressure load of the normal business traffic of the business system.
[0107] Reference Figure 4 , Figure 4 The flowchart of the second embodiment of the business system stress test method of the application is shown.
[0108] Based on the first embodiment, in the embodiment, the step S20 comprises:
[0109] Step S201: data monitoring is performed on the business system to obtain business volume data of the business system.
[0110] Step S202: trend prediction is performed on the business system based on the business volume data to obtain an initial trend value.
[0111] Step S203: each index weight in the business volume data is adjusted.
[0112] Step S204: the initial trend value is corrected based on the adjusted index weight to obtain a business volume peak trend value.
[0113] It should be noted that the embodiment monitors user business volume data of the business system, decomposes the business volume data, and can be extended to user access traffic, system throughput, user browsing volume, TPS, QPS, deep access, total access times, access frequency per second, and total access time. These business volume data directly affect the trend value of the business volume. Since the embodiment needs to perform modeling analysis and algorithm construction analysis on the business volume data to obtain a real and effective business volume peak trend value.
[0114] It can be understood that the embodiment can calculate and predict the average value of the past m periods of business volume data by using the exponentially weighted moving average algorithm (EWMA), and the following formula is referred to. Taking user access traffic in the business volume system as an example, the data volume of 30s collected in advance is referred to Figure 5 , Figure 5 The data volume is shown in the following figure.
[0115]
[0116] The pressure testing device can calculate the flow prediction value and prediction error rate of the future 3-period moving average model through the moving average algorithm. Referring to the following table, the flow prediction value and prediction error rate of the future 3-period moving average model can be calculated. The calculation method is simple, effective and intuitive. The average value of the previous m-period data is used as the prediction value of the last period, and the weight of the previous data is 1 / m. That is, in this moving average method, each piece of m-period data has the same influence on the prediction value. However, the prediction value of the moving average algorithm cannot be completely used as the reference traffic trend value data. It is also necessary to adjust the weight of the previous data.
[0117] Serial number Predicted value True value Error rate / % 31 876.41 896.13 2.26 32 902.8 955.3 5.68 33 903.2 943.1 4.09
[0118] It should be understood that the pressure testing device can adjust and calculate the weight of each index of the traffic data through the self-developed smoothing model modeling and calculation method. The smoothing model and calculation method are suitable for increasing and decreasing traffic trend time series. The calculation is referred to the following formula, wherein θ t represents the sequence of each incremental amount, and α and β are two smoothing coefficients.
[0119]
[0120]
[0121] In combination with the current intelligent payment business, the traffic data of the payment product will have a direct relationship with different time periods within 24 hours, the beginning, middle and end of each month, and holidays, promotional activities and preferential policies. The current trend value of traffic is obtained through the smoothing model modeling and calculation method to alleviate the lag problem of the model and improve the sensitivity and accuracy of the traffic trend value. Taking the user access traffic in the traffic system as an example, the smoothing model is calculated and 3-period data prediction is performed. The data trend is shown in Figure 6 , and Figure 6 is a data trend diagram. The peak trend value obtained in this way is more accurate, and the data value is shown in Figure 7 , and Figure 7 is a diagram of data performance.
[0122] The embodiment obtains the business volume data of the business system by monitoring the data of the business system, performs trend prediction on the business system based on the business volume data, obtains an initial trend value, adjusts the weight of each index in the business volume data, corrects the initial trend value based on the adjusted index weight, and obtains a business volume peak trend value. Since the embodiment performs trend prediction on the business system based on the data monitoring result of the business system, obtains an initial trend value, and corrects the initial trend value based on the adjusted index weight, the data of the business system is accurately predicted, and the accuracy of the trend value is improved.
[0123] Reference Figure 8 , Figure 8 The flowchart of a third embodiment of the business system stress testing method is shown.
[0124] Based on the first embodiment, in the embodiment, the step S30 comprises:
[0125] Step S301: Extracting original data from the database of the business system;
[0126] Step S302: Feature extraction is performed on the original data to obtain an abstract feature vector;
[0127] Step S303: Feature interaction is performed on the abstract feature vector to obtain a feature interaction vector;
[0128] Step S304: The number of resource pools is determined based on the feature interaction vector and the business volume peak trend value;
[0129] Step S305: At least one resource pool is created based on the number of resource pools.
[0130] It should be noted that the embodiment dynamically determines the number of corresponding thread pools through the business volume trend value by combining the compressed interactive network model and the intelligent recommendation algorithm of deep learning in the technical implementation of intelligent recommendation dynamic thread pool. In the same scheme, the number of independent dynamic thread pools can be matched by analyzing the business volume trend and combining the intelligent recommendation algorithm of deep learning, the full-link stress testing of the production environment can be carried out at any time and in any way during the normal operation of the product, and the operation of the thread pool can be reasonably solved, the resource cost is saved, and more powerful guarantee measures are provided for the stable operation of the business.
[0131] It can be understood that the stress testing equipment of the embodiment can automatically extract abstract features from complex original data such as pictures, texts, and conversations by using the compressed interactive network model algorithm, and all features are combined as chaotic original data, and useful feature interactions are automatically extracted from the deep neural network.
[0132] The feature interaction vector is input into a pre-constructed feature classification model to obtain a classification result.
[0133] Further, in order to accurately calculate the resource pool quantity to meet the resource requirement of the stress test traffic, the step S304 can include:
[0134] The feature interaction vector is input into a pre-constructed feature classification model to obtain a classification result.
[0135] Based on the classification result, the explicit feature vector and the implicit feature vector are extracted from the data file of the database.
[0136] Based on the explicit feature vector and the implicit feature vector, a joint feature vector is determined.
[0137] The joint feature vector is input into a pre-constructed classification model to obtain a classification result.
[0138] Based on the classification result, a feature vector recall rate is determined.
[0139] According to the feature vector recall rate and the traffic peak trend value, a resource pool quantity is determined.
[0140] It should be noted that the embodiment can use a compressed interaction network model algorithm to automatically extract abstract features from complex raw data such as pictures, texts and conversations. All features are combined as disordered raw data, and useful feature interactions are automatically extracted from the deep neural network. Taking the intelligent fee payment business scenario as an example, the current resource usage of the system mainly includes various resource data trend charts in the data bearing big board, such as TPS trend pictures of application nodes, CPU memory utilization data of servers, and current disk write evaluation analysis texts. It is necessary to consider these raw data composed of pictures, texts and conversation data, and automatically extract vector features through the compressed interaction network model algorithm. The extracted vector features are: application node TPS, traffic trend data, disk write rate, network bandwidth occupancy rate, etc. These feature vectors have a direct impact on accurately determining the number of independent thread pools. This step comprehensively considers the influencing factors of system thread pool resource usage, and extracts these influencing factor features as feature values through the compressed interaction network model algorithm, and generates unique feature interaction vectors.
[0141] The pressure testing device takes the feature interaction vector as the input of the machine learning model to obtain different classification results, and the classification results are one or more different multi-modal data types in the original data file. The machine learning model is a machine learning model trained using the joint feature vector, and the joint feature vector includes the explicit feature vector and the implicit feature vector extracted from the feature file of the known feature type.
[0142] This step extracts implicit features by combining sparse structure units with residual units. Implicit features are not obvious features, such as features that cannot be intuitively obtained from raw data.
[0143] The specific method is to determine the feature type label A of each data file in the database, and the feature type label B indicates one or more feature types contained in each feature file. The number of feature types included in the feature file; when the feature file contains a certain feature type, in the feature type label A, the certain feature type corresponds to a i =1, and the other parameters are 0. Assuming that a1 represents the feature type of typical binary heap overflow, a2 represents the feature type of stack overflow, a3 represents the feature type of format string, and a4 represents the feature type of double free. If a feature file only includes the identification of format string and the identification of double free, and does not include the typical binary heap overflow and the identification of stack overflow, then the feature type A of the certain feature file = (a1, a2, a3, a4) = (0, 0, 1, 1). According to the feature label vector A of each feature file, the feature files in the feature library are classified.
[0144] The set of function structure vectors A of all feature files belonging to the same feature type in the feature library is taken as the input of the one-dimensional convolutional neural network to obtain the implicit feature vector.
[0145] This process combines the implicit feature vector that affects the business volume trend in the intelligent payment business, such as the user access distribution of each region, the distribution ratio of each channel of payment, and the distribution of user payment methods, which all constitute implicit influencing factors for business volume trend analysis. Through the combination of sparse structure units and residual units, the implicit features are finally successfully extracted. In this way, the running state of the active thread pool and the dormant thread pool can be obtained using the algorithm model, which is more conducive to the rationalization of the dynamic distribution of threads and achieves the best effect.
[0146] It can be understood that the embodiment extracts the explicit feature vector of the feature file from the feature library, and the display feature vector includes the function type vector A and the function structure vector V. The feature type label B of each feature file in the feature library is determined, and the feature type label B represents one or more feature types contained in each feature file. The deep fusion model in the embodiment learns the explicit feature interaction using the compressed interaction network. The deep fusion model in the embodiment also benefits from the sparse structure connection and the cross-channel transmission of the original information in the residual network, combines the two best structures in the neural network, and achieves better results. The unique feature of the residual unit is that it allows the original input information to be directly transmitted to the next layer. The traditional convolutional layer or fully connected layer has problems such as information loss and loss in information transmission. The residual unit solves this problem to some extent, which allows information to bypass the output to protect the integrity of the information. The specific calculation formula is as follows:
[0147] x 0 =f(x I ,{w0,w1},{b0,b1})+x I
[0148] Where w0 and w1 are the parameters of the two layers of neurons, and f is the mapping from input to output. Unlike the multiple operations of the original feature x 0 in the Cross Network, the embodiment still saves the complete input feature when the original feature enters the nonlinear operation. The experimental results of the deep feature cross model proposed in the embodiment reflect the superiority of the residual unit.
[0149] The specific method is: dividing the feature file into K types, so that each feature type corresponds to one or more feature files, and then corresponds to one or more function structure vectors V. The electronic device can determine the function structure vector V corresponding to the final feature type, for example, V=(v1, v2,…v k ), and the similarity is determined according to the following formula:
[0150]
[0151]
[0152] Where p is the similarity; Vw is the classification result; N is the number of vulnerability types included in Vw; is the average value of the function structure vector V corresponding to the final vulnerability type, V1 is the lth element in the function structure vector V; and K is the number of elements in the function structure vector V corresponding to the final vulnerability type.
[0153] The explicit feature vector of the vulnerability file is extracted from the vulnerability library, and the display feature vector includes the function type vector A and the function structure vector V.
[0154] The sparse structure unit in the embodiment can effectively expand the network width and depth, improve the precision, and avoid overfitting. The sparse structure is very suitable for neural networks, especially for large and deep neural networks, which can reduce overfitting and reduce the amount of calculation. For example, the convolutional neural network adopts the sparse structure. The main goal of the sparse structure unit is to find the optimal sparse structure, which is based on the Hebbian principle that neural reflection activity can lead to the stability of neuron connection. Therefore, the deep fusion model combines the sparse structure unit to optimize the residual unit.
[0155] It should be understood that the reference Figure 9 , Figure 9 For comparison between the original residual unit structure and the optimized structure, the 1x1 convolution kernel is a very efficient structure in the neural network, which can reduce the network calculation amount while improving the performance of the network. This step learns the correlation between more comprehensive and subtle features through explicit and implicit high-order feature parallel learning. The method can further improve the accuracy by rationalizing the dynamic distribution of threads, making the explicit and implicit high-order features more interpretable and generalizable. The explicit feature vector that affects the business volume trend in the intelligent payment business: user access traffic, system throughput, user browsing volume, TPS, QPS, deep access, total access times, access frequency per second, total access time.
[0156] From the implicit feature vector obtained by the convolutional neural network, the first implicit feature vector is determined, and the first implicit feature vector and the explicit feature vector V form a joint feature vector. Assuming that the explicit feature vector V includes 5 parameter values (elements) and the implicit feature vector includes 15 values, the joint feature vector includes 20 parameter values (elements). The joint feature vector is used as the input of the machine learning model to obtain the classification result, which includes the recall rate of the explicit feature vector and the recall rate of the implicit feature vector.
[0157] Determine the recommended number of thread pools according to the current business volume trend. Based on the feature recognition ability of the deep fusion model on different data sets, the calculation formula of the recommended number of thread pools is obtained, F represents the number of thread pools, R1 represents the recall rate of the explicit feature vector, R2 represents the recall rate of the implicit feature vector, and P represents the business volume trend value. The specific representation is as follows:
[0158]
[0159] The embodiment extracts original data from a database of the business system, extracts features from the original data, obtains an abstract feature vector, interacts features of the abstract feature vector to obtain a feature interaction vector, determines a resource pool quantity based on the feature interaction vector and the traffic peak trend value, and creates at least one resource pool based on the resource pool quantity. Since the embodiment extracts features from original data of a business system, and creates a resource pool based on a feature interaction vector and a traffic peak trend value, dynamic allocation of resources of the business system is realized, and the resource load pressure of normal traffic of the business system is effectively relieved, thereby providing a more powerful guarantee measure for stable operation of the business.
[0160] In addition, the embodiment of the application further provides a storage medium, wherein the storage medium stores a business system stress test program, and the business system stress test program realizes the steps of the business system stress test method when executed by a processor.
[0161] Since the storage medium adopts all the technical solutions of the above embodiments, all the beneficial effects brought by the technical solutions of the above embodiments are achieved, and thus will not be described here.
[0162] Reference Figure 10 , Figure 10 is a structural block diagram of the first embodiment of the business system stress test device.
[0163] As Figure 10 shown, the business system stress test device provided by the embodiment of the application comprises:
[0164] A traffic identification module 10 is configured to intercept and identify the entrance traffic of the business system, and determine the stress test traffic in the entrance traffic.
[0165] A trend calculation module 20 is configured to obtain a traffic peak trend value of the business system.
[0166] A resource pool construction module 30 is configured to create a resource pool based on the traffic peak trend value.
[0167] A stress test module 40 is configured to distribute the stress test traffic to the resource pool, and perform stress test on the business system.
[0168] Further, the trend calculation module 20 is further configured to monitor data of the business system to obtain traffic data of the business system, predict a trend of the business system based on the traffic data to obtain an initial trend value, adjust the weight of each index in the traffic data, correct the initial trend value based on the adjusted index weight to obtain a traffic peak trend value.
[0169] Further, the resource pool construction module 30 is further configured to monitor resources of the business system to obtain a current resource utilization rate of the business system, determine whether the current resource utilization rate exceeds a critical threshold based on the traffic peak trend value, and create a resource pool based on the traffic peak trend value when the current resource utilization rate exceeds the critical threshold.
[0170] Further, the resource pool construction module 30 is further configured to determine a resource elasticity parameter of the business system based on the current resource utilization rate, obtain a resource capacity parameter of the business system, and determine the critical threshold based on the resource capacity parameter and the resource elasticity parameter.
[0171] Further, the resource pool construction module 30 is further configured to score resources of the business system based on the resource elasticity parameter to obtain a resource occupation score, score business trends of the business system based on the traffic peak trend value to obtain a business trend score, and calculate a critical proportion based on the resource occupation score and the business trend score.
[0172] Further, the resource pool construction module 30 is further configured to extract original data from a database of the business system, extract abstract feature vectors from the original data, interact features of the abstract feature vectors to obtain feature interaction vectors, determine a resource pool quantity based on the feature interaction vectors and the traffic peak trend value, and create at least one resource pool based on the resource pool quantity.
[0173] Further, the resource pool construction module 30 is further configured to input the feature interaction vectors into a pre-constructed feature classification model to obtain a classification result, extract explicit feature vectors and implicit feature vectors from data files of the database based on the classification result, determine joint feature vectors based on the explicit feature vectors and the implicit feature vectors, input the joint feature vectors into a pre-constructed classification model to obtain a classification result, determine a feature vector recall rate based on the classification result, and determine a resource pool quantity based on the feature vector recall rate and the traffic peak trend value.
[0174] This embodiment intercepts and identifies the ingress traffic of the business system, determines the stress test traffic within the ingress traffic, obtains the peak trend value of the business system's traffic volume, creates a resource pool based on the peak trend value, allocates the stress test traffic to the resource pool, and performs stress testing on the business system. Because this embodiment first intercepts and identifies the ingress traffic of the business system, it effectively isolates the stress test traffic from real user traffic, thus avoiding traffic data pollution. Creating a resource pool based on the peak trend value of the business system's traffic volume and allocating the stress test traffic from the ingress traffic to the resource pool achieves dynamic resource allocation. By allocating stress test traffic to the resource pool, the stress testing efficiency of the business system is effectively improved, and the pressure load of the business system's normal business traffic is effectively alleviated.
[0175] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.
[0176] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0177] In addition, for technical details not described in detail in this embodiment, please refer to the business system stress testing method provided in any embodiment of the present invention, which will not be repeated here.
[0178] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0179] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0180] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, can also be through hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the prior art contribution can be embodied in the form of software products, the computer software product is stored in a storage medium (such as read only memory (Read Only Memory, ROM) / RAM, disk, optical disk), including a number of instructions to make a terminal device (may be a mobile phone, computer, server, or network equipment, etc.) executes the method described in various embodiments of the present application.
[0181] The above is only the preferred embodiment of the present application, not therefore limit the patent scope of the present application, any equivalent structure or equivalent flow transformation using the content of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for stress testing a business system, characterized in that, The stress testing methods for the business system include: Intercept and identify the inbound traffic of the business system to determine the stress test traffic within the inbound traffic; Obtain the peak trend value of the business volume of the business system; Create a resource pool based on the peak business volume trend value; The load test traffic is allocated to the resource pool, and the business system is subjected to load testing. The step of obtaining the peak trend value of the business volume of the business system includes: Data monitoring is performed on the business system to obtain the business volume data of the business system; Based on the business volume data, the business system is used to predict trends and obtain initial trend values. Adjust the weights of each indicator in the aforementioned business volume data; The initial trend value is corrected based on the adjusted indicator weights to obtain the peak trend value of business volume.
2. The business system stress testing method as described in claim 1, characterized in that, The creation of the resource pool based on the peak business volume trend value includes: Perform resource monitoring on the business system to obtain the current resource utilization rate of the business system; Based on the peak trend value of the business volume, determine whether the current resource utilization rate exceeds the critical threshold. When the current resource utilization rate exceeds the critical threshold, a resource pool is created based on the peak trend value of the business volume.
3. The business system stress testing method as described in claim 2, characterized in that, Before determining whether the current resource utilization rate exceeds the critical threshold based on the peak trend value of the business volume, the method further includes: The resource elasticity parameters of the business system are determined based on the current resource utilization rate. Obtain the resource capacity parameters of the business system; The critical threshold is determined based on the resource capacity parameter and the resource elasticity parameter.
4. The business system stress testing method as described in claim 1, characterized in that, The creation of the resource pool based on the peak business volume trend value includes: Extract raw data from the database of the business system; Feature extraction is performed on the original data to obtain an abstract feature vector; Perform feature interactions on the abstract feature vector to obtain the feature interaction vector; The number of resource pools is determined based on the feature interaction vector and the peak trend value of the business volume. Create at least one resource pool based on the number of resource pools.
5. The business system stress testing method as described in claim 4, characterized in that, The step of determining the number of resource pools based on the feature interaction vector and the peak trend value of the business volume includes: The feature interaction vector is input into a pre-built feature classification model to obtain the classification result; Based on the classification results, explicit and implicit feature vectors are extracted from the data files in the database; The joint feature vector is determined based on the explicit feature vector and the implicit feature vector; The joint feature vector is input into a pre-built classification model to obtain the classification result; The feature vector recall rate is determined based on the classification results. The number of resource pools is determined based on the feature vector recall rate and the peak trend value of the business volume.
6. A business system stress testing device, characterized in that, The business system stress testing device includes: The traffic identification module is used to intercept and identify the inbound traffic of the business system and determine the stress test traffic in the inbound traffic; The trend calculation module is used to obtain the peak trend value of the business volume of the business system; The resource pool construction module is used to create a resource pool based on the peak trend value of the business volume; The stress testing module is used to allocate the stress testing traffic to the resource pool and perform stress testing on the business system. The trend calculation module is further configured to monitor the business system to obtain business volume data; predict the trend of the business system based on the business volume data to obtain an initial trend value; adjust the weights of various indicators in the business volume data; and correct the initial trend value based on the adjusted indicator weights to obtain a peak business volume trend value.
7. A business system stress testing device, characterized in that, The business system stress testing device includes: a memory, a processor, and a business system stress testing program stored in the memory and capable of running on the processor, wherein the business system stress testing program is configured to implement the business system stress testing method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores a business system stress test program, which, when executed by a processor, implements the business system stress test method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Pressure testing method and device and server
CN109309596A
Network parameter configuration method and device, computer equipment and storage medium
CN112532409A