A database system application benchmark test specification design method and test method
By collecting and decomposing usage requirements, extracting key variables, performing normalization and clustering, building a minimum set of typical application systems, and designing flexible benchmark testing solutions, we solve the problem that database system benchmark testing specifications in the existing technology cannot represent different application systems. demand issues, achieving cost reduction and efficiency improvement.
Patent Information
- Application Number
- CN202011164926.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-04-16
- Filing Date
- 2020-10-27
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-10-27
AI Technical Summary
Existing database system benchmark testing specifications cannot fully represent the usage requirements of different real application systems, resulting in high testing costs and unfavorable results analysis. There is a lack of effective usage requirement information reduction methods to represent most usage requirements.
Adopting a database system application benchmark test specification design method, by collecting and decomposing usage requirements, extracting key variables, normalizing and clustering, building a minimum set of typical application systems, designing flexible benchmark testing solutions, reducing testing costs and Improve efficiency.
Using the demand information simplicity method reduces testing costs, improves testing efficiency, and improves flexibility in terms of environmental requirements, business relationships, and simulated loads, and can effectively represent most usage requirements.
Smart Images

Figure CN112363916B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to database testing technology, and in particular to a database system application benchmark testing specification design method and a testing method for performing benchmark testing on multiple application systems. Background Art
[0002] The database system refers to the system after the database is introduced into the computer system. It is generally composed of databases, database management systems, etc. Its quality has a vital impact on the overall capabilities of the application system. Benchmark testing is to achieve quantitative comparative testing of the performance indicators of a class of test objects by designing scientific test content and test tools.
[0003] General benchmark test specifications represented by TPC-E and TPC-H are widely used by domestic and foreign manufacturers to implement database system benchmark tests. However, the environmental requirements, business relationships, and simulated loads of these general benchmark test specifications are relatively fixed and cannot fully represent the usage requirements of different real application systems.
[0004] Moreover, when there are many application systems that need to be tested, if a comprehensive test is performed on each application system separately, the cost of full coverage testing is high and it is not conducive to result analysis.
[0005] It can be seen that at present, there is a lack of effective methods for simplifying usage demand information, using a minimum set of typical application systems to represent most usage requirements. Summary of the invention
[0006] In view of this, the present invention provides a database system application benchmark specification design method and testing method, adopts an effective usage requirement information simplification method, uses a minimum set of typical application systems to represent most usage requirements, and reduces the cost of testing and improves testing efficiency while ensuring comprehensive coverage.
[0007] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:
[0008] A database system application benchmark test specification design method is used for benchmarking multiple application systems, including:
[0009] Step 1: Collect usage requirements for each application system in the multiple application systems; if a usage requirement includes more than two operation scenarios, decompose the usage requirement according to the operation scenario;
[0010] Step 2: Extract key variable values from usage requirements based on the specified key variables; usage requirements without specified key variables are deleted;
[0011] Step 3: Perform normalization operations on each key variable; construct a piece of data using the application system, operation scenario, and normalized value of the key variable;
[0012] Step 4: Cluster all data pieces, and clustering is only performed on the normalized values of key variables;
[0013] Step 5: Determine the application systems involved in each category, and take the minimum application system set that can cover all categories as the typical application system;
[0014] Step 6: Design a benchmark test plan for a typical application system.
[0015] The normalization adopts range normalization or standard deviation normalization.
[0016] Wherein, the clustering is implemented by using K-means algorithm or Statistical Products and Services Solutions (SPSS) software.
[0017] Preferably, after the usage requirements are decomposed in step 1, data cleaning is further performed on the usage requirements to delete incomplete usage requirements with required key variables.
[0018] Preferably, the step 6 is specifically:
[0019] First, each typical application system corresponds to a test item. A test item weight W-Si is configured for each test item according to the importance of the typical application system. The ability score of each test item is weighted to obtain the total ability score, i.e., the test target.
[0020] Each test item consists of prerequisites, basic use cases and extended use cases; the prerequisites define the conditions and states that must be met before the basic use case test item is implemented; the basic use case consists of at least one benchmark use case, which is the required test content for the implementation of the test item; the extended use case is the optional test content for the implementation of the test item; a use case weight W-Ti is configured for each benchmark use case, and the benchmark use case is used to test the corresponding typical application system to obtain a capability score. The capability score of each benchmark use case is weighted to obtain the capability score of the test item.
[0021] Preferably, the benchmark test case includes a case target, an environment requirement, a transaction requirement, an execution requirement, and an evaluation method;
[0022] The use case objectives are: to describe the typical application system simulated by the benchmark test case;
[0023] The environment requirements: define the system status before test execution;
[0024] The transaction requirements: describe the concept and requirements of each transaction, and define each operation sample, operation type, impact domain, expected result, and key threshold of the transaction;
[0025] The execution requirements: define the test run process requirements;
[0026] The evaluation method described herein uses the degree of satisfaction of user needs as the evaluation standard, and measures the ability of a database system to provide services when certain parameters are fixed.
[0027] The present invention also provides a database system application benchmark test method, which adopts the above-mentioned database system application benchmark test specification design method to obtain a benchmark test plan, and uses the benchmark test plan to test a typical application system to achieve the test target.
[0028] Beneficial effects:
[0029] (1) The present invention uses a demand information simplification method, using a minimum set of typical application systems to represent most usage requirements, thereby reducing the cost of testing and improving testing efficiency while ensuring comprehensive coverage.
[0030] (2) The requirements in terms of environment, business relationships, and simulated loads are relatively flexible, meeting the usage requirements of different real application systems and improving the flexibility of application benchmark specifications. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flow chart of the present invention.
[0032] Figure 2 A schematic diagram of using a requirement set.
[0033] Figure 3 Schematic diagram of benchmarking a typical application system.
[0034] Figure 4 Schematic diagram of the benchmark use case. DETAILED DESCRIPTION
[0035] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0036] The present invention provides a database system application benchmark test method, which decomposes the use requirements of all application systems according to operation scenarios, and then clusters the use requirements of different application systems in different operation scenarios. According to the clustering results, the application systems involved in each category are taken as typical application systems, so as to obtain a minimum set of typical application systems. The typical application system is used to represent most of the use requirements, and only the benchmark test is performed on the typical application system, so as to reduce the cost of the test.
[0037] See also Figure 1 The specific implementation process of the database system application benchmark test method of the present invention includes the following steps:
[0038] Step 1: Collect usage requirements for each application system in the multi-application system. If a usage requirement includes more than two operation scenarios, decompose this usage requirement according to the operation scenario to form a usage requirement set, such as Figure 2 shown.
[0039] The usage requirements set is the source of information for the benchmark specification. Some usage requirements may consist of multiple operations. Operation scenarios include commonly used query, add, modify, delete, and may also include other actions such as import, export, sort, etc.
[0040] Generally speaking, a usage requirement only includes one operation scenario. However, some user-provided operation scenarios include multiple operation scenarios. For example, in order to avoid duplicate writing, an information system performs a query operation before adding information to the database to determine whether the information already exists. In this case, the system's information writing usage requirements include two operations: query and add. In order to cooperate with subsequent aggregation operations, each usage requirement needs to correspond to an application system and an operation scenario. Therefore, it is necessary to decompose the usage requirements that include multiple operation scenarios so that the content expressed by the usage requirements is as unified as possible and not intertwined.
[0041] Table 1 shows the collection result of usage requirements as an example. The 7th, 8th, 9th and 10th usage requirements are newly added operations, so the operation of querying whether the information exists is added. These usage requirements need to be decomposed. The decomposition results are shown in the data of the 7th to 10th and 11th to 14th items in Table 2. Since 4 usage requirements were added, the original 14 items became 18 items.
[0042] Table 1 Results of collecting usage requirements
[0043]
[0044] Table 2 Decomposition results of usage requirements
[0045]
[0046]
[0047] In the above table, the operation scenarios are divided into query (R), add (A), modify (M), and delete (D), and are written centrally for easy viewing.
[0048] Step 2: Extract key variable values from usage requirements based on the specified key variables; usage requirements without specified key variables are deleted.
[0049] This step includes two layers of operations:
[0050] The first level of operation is to clean up incomplete usage requirements. Whether the usage requirements are complete depends on whether they contain all the specified key variables. For example, the specified key variables in Table 1 include the initial data volume, number of users, response time, and input data volume. The query operations decomposed from the newly added data items 11-14, namely items 7-10, do not include the response time, and the data item 16 does not include the initial data volume and the input data volume, so these 5 data items need to be cleaned up. Finally, 13 data items are left.
[0051] The second level of operation is to extract the key variable values. Key variables can be specified externally. Key variables are characteristic portraits of operation scenarios and generally do not cover all information items of operation scenarios. Information items with significant impact can be selected from the operation scenarios, such as user load, initial number, input data block size, result record set size, response time, etc., and set to appropriate quantitative variable types (numeric types), which can effectively reduce the amount of calculation and improve the clustering effect. Some operation scenario information items are text types and need to be decomposed into multiple quantitative variables. For example, the library table model is generally text information, which can be decomposed into the number of tables, the number of table columns, the complexity of table relationships, etc. as alternative variables.
[0052] The key variables specified in this example include the initial data volume, the number of users, the response time, and the input data volume. The results of extracting the key variable values from the usage requirements are shown in Table 3, which has a total of 13 data items. Among them, S1R1 represents the query operation scenario of the application system S1.
[0053] Table 3 Key variable value extraction results
[0054]
[0055]
[0056] The above key variables can be written as a matrix. After the above data preprocessing, a set X with N data and D key variables is obtained, which is {x1, x2, …, x N}, it can be represented as the following N×D key variable matrix, where each row is a set of key variable values for a piece of usage demand data.
[0057]
[0058] Among them, x nd is the dth key variable value in the nth data, n∈[1,N],d∈[1,D].
[0059] In this example, the values in Table 3 above are quantified into appropriate quantitative variable types (numeric type), and the key variable matrix is obtained as follows:
[0060]
[0061] Step 3: Perform normalization operations on each key variable. Use the application system, operation scenario, and normalized value of the key variable to construct a piece of data.
[0062] When the units of key variables are not uniform and the range of values varies greatly, it will affect the subsequent grouping effect. You can use range normalization or standard deviation normalization to replace the original value, normalize the value of the key variable, and replace the original value. The two algorithm formulas are as follows:
[0063]
[0064] Where: x ij is the element in the i-th row and j-th column of the key variable matrix, x ij 'It is x ij The corresponding normalized result, min j (x j ) is the minimum value of the jth column of the key variable matrix, max j (x j ) is the maximum value in the jth column.
[0065]
[0066] Where: μ j is the mean of the jth column of the key variable matrix, σ j is the sample variance of the jth column of the key variable matrix.
[0067] In this example, the key variable matrix after the first normalization method is as follows:
[0068]
[0069] After processing in this step, the four parameters in each row of the key variable matrix, together with the expression of the application system and operation scenario (eg, S1R1), form a piece of data.
[0070] Step 4: Cluster all the data obtained in step 3. Clustering is performed only on the normalized values of key variables to obtain K categories.
[0071] Since the use requirements of the database system may continue to expand, the operation scenario grouping method should be a method that can automatically classify based on the scenario data without relying on pre-defined classes or class labels. Clustering pattern discovery is a method that uses different sample data to dynamically obtain clustering results. Data instances in the same cluster are the same, and instances in different clusters are different.
[0072] Clustering can be achieved using the K-means algorithm or Statistical Products and Services Solutions (SPSS) software. When the number of rows in the key variable matrix is large, and the column values do not exist or there are very few isolated points, the database system grouping preferably uses the K-means algorithm. The group mean initialization of the k-means algorithm is performed by randomly generating k points in the data space, and the two steps of group assignment and center point update are continuously iterated until the requirements are met. k can be given by the user.
[0073] In this example, two clustering methods are used to cluster all the data in X.
[0074] Method 1: Use K-means algorithm for grouping
[0075] 1. First, determine a k value, that is, we hope to cluster the data set into k sets. Divide the matrix X into 13 groups according to the rows, that is, A = {A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13}, and determine the k value to be 5.
[0076] 2. Randomly select k data points from the dataset as centroids.
[0077] Select five points A1, A3, A5, A7, and A12 as the centroid.
[0078] 3. For each point in the data set, calculate the distance (such as Euclidean distance) from each centroid. The point is assigned to the set to which the centroid it is closest to. Calculate the distances from A2, A4, A6, A8, A9, A10, A11, A13 to the five centroids A1, A3, A5, A7, A12 respectively.
[0079] Calculate for A2, the Euclidean distances between A2 and A1, A3, A5, A7, and A12 are d1, d2, d3, d4, and d5 respectively. d5 is the smallest, so A2 is divided into group A12, and the same goes for other groups.
[0080] 4. After all the data are grouped, there are k sets in total. Then recalculate the centroid of each set.
[0081] 5. If the distance between the newly calculated centroid and the original centroid is less than a certain set threshold (indicating that the position of the recalculated centroid has not changed much and tends to be stable, or converged), it can be considered that the clustering has achieved the desired result and the algorithm terminates.
[0082] 6. If the distance between the new centroid and the original centroid changes greatly, 3 to 5 steps need to be iterated.
[0083] Iterate steps 3-5 and finally obtain the cluster analysis grouping result: C = {A1, A9, A4} {A2, A12} {A3, A5, A6, A7, A8, A10} {A11} {A13}, that is, C = {C1, C2, C3, C4, C5} group.
[0084] Method (2) Use SPSS Statistics tools to perform cluster analysis on the X matrix, and the grouping results are also:
[0085] C1={A1、A9、A4}
[0086] C2={A2、A12}
[0087] C3={A3, A5, A6, A7, A8, A10}
[0088] C4={A11}
[0089] C5={A13}
[0090] That is, C = {C1, C2, C3, C4, C5} group.
[0091] According to the application systems and operation scenarios corresponding to A1-A13, the groups are written as follows:
[0092] C1={A1, A9, A4}={S1R1, S2A1, S1A1}
[0093] C2={A2, A12}={S1R2, S3A1}
[0094] C3={A3, A5, A6, A7, A8, A10}={S1R3, S1M1, S1D1, S2R2, S2A2}
[0095] C4={A11}={S3R1}
[0096] C5={A13}={S3D1}
[0097] From the above grouping, we can see that:
[0098] The description is as follows:
[0099] 1) The application information system in this field focuses on adding and querying operations for the database system;
[0100] 2) In terms of query operation R grouping, group C1 has a high number of users and requires low query performance when the data volume is average; group C2 has a general query performance requirement when the data volume is average; group C3 has a low number of users and high query performance requirements when the data volume is low; group C4 has a small number of isolated scenarios, and in the case of big data, it requires a high number of users and general query performance requirements.
[0101] 3) In terms of the newly added operation A group, the C2 group has a general requirement for the number of users and a general requirement for write throughput; the C1 group has a general requirement for the number of users and a relatively low requirement for write throughput; the C3 group has a general requirement for the number of users and a relatively high requirement for write throughput.
[0102] 4) In terms of modifying the M group of operations, the C3 group has a normal data volume requirement and a normal number of users, but a high write throughput requirement.
[0103] 5) In terms of deletion of group D, group C3 has average data volume requirements, average number of users, and average write throughput requirements. Group C5 has a small number of isolated scenarios, and in the case of big data, average number of users, and high query performance requirements.
[0104] It can be seen that the grouping results obtained by using the K-means algorithm and SPSS software are reasonable, and the data characteristics belonging to the same group are similar.
[0105] Step 5: Determine the application systems involved in each category, and take the minimum set of application systems that can cover all categories as typical application systems.
[0106] In this example, C1 involves S1 and S2, C2 involves S1 and S3, C3 involves S1 and S2, C4 involves S3, and C5 involves S3. It can be seen that the set of S1 and S3 can cover all categories. Therefore, this step selects S1 and S3 as typical application systems.
[0107] Step 6: Design a benchmark test plan for a typical application system.
[0108] See also Figure 3 , a preferred benchmark framework includes the following 6 parts. The application benchmark model framework includes 6 key information groups:
[0109] (1) Test objectives. The application benchmark specification is constructed from the bottom up. It is a comprehensive description of the use case objectives of each test item and is also the top-level requirement of the benchmark.
[0110] (2) Test items. Test items are a collection of test cases from the same typical application system, with the same prerequisites, library table structure, etc. iIt is the weight of the test item to the test target. Si represents the typical application system Si.
[0111] (3) Prerequisites. Prerequisites belong to a certain test item and are the conditions and states that must be met before the test item is implemented. Otherwise, the test results cannot be trusted. Prerequisites are derived from the key functions, security, and standard requirements of the test item. For example, if the basic use case is a test related to database performance, then the prerequisite is that the database-related functions must be tested first to ensure that the test of the basic use case is effective.
[0112] (4) Benchmark use cases. The basic use case set belongs to a certain test item, is the mandatory content of the test item implementation, and has a direct impact on the evaluation of the test item. The basic use cases are derived from the core business scenarios in the field and generally contain typical operation scenarios that represent more operations. i is the weight of the test case to the test item.
[0113] like Figure 4 As shown, the benchmark use case includes use case goals, environment requirements, transaction requirements, execution requirements, and evaluation methods.
[0114] ① Use case objectives. Briefly describe the typical application system simulated by the test case, including typical application system characteristics, business processes, transactions, data relationship overview, etc.
[0115] ②Environmental requirements: define the system status before the test is executed, including the test hardware environment deployment requirements (for example, some typical application systems require a hot standby mode for the database system), software basic environment configuration requirements, database table mode, table field definition, prerequisite data volume, data growth space, etc.
[0116] ③Transaction requirements: Describe the concept and requirements of each transaction, define each operation sample, operation type, impact domain (form data items affected by the operation), expected results, key thresholds (for example, the response time threshold of an operation is 10 seconds, and the result of the object under test exceeds 10 seconds, then the object fails the test), etc.
[0117] ④ Execution requirements: Define the test operation process requirements, including the number of simulated users, transaction load distribution ratio, distribution of input values (for example, requiring input values to be approximately normally distributed within a certain interval), transaction interval time, service response time, form data changes, service stability requirements, and operation monitoring requirements.
[0118] ⑤Evaluation method: Different from the peak pressure measurement method of general benchmark specifications, application benchmark testing uses the degree of user demand satisfaction as the evaluation standard, so it generally measures the ability of the database system to provide services under fixed pressure or response time. For example: when the number of simulated users is fixed, measure the response time / throughput of the database system.
[0119] (5) Extended use cases: Extended use cases are optional test contents for test item implementation.
[0120] It can be seen that each typical application system corresponds to a test item. A test item weight W-Si is configured for each test item according to the importance of the typical application system. The capability score of each test item is weighted to obtain the total capability score, that is, the test objective; each test item consists of prerequisites, basic use cases and extended use cases; the prerequisites define the conditions and states that must be met before the implementation of the basic use case test item; the basic use case consists of at least one benchmark use case, which is the required test content for the implementation of the test item; the extended use case is the optional test content for the implementation of the test item; a use case weight W-Ti is configured for each benchmark use case, and the benchmark use case is used to test the corresponding typical application system to obtain the capability score, and the capability score of each benchmark use case is weighted to obtain the capability score of the test item.
[0121] Step 7: Use the benchmark solution to benchmark typical application systems and complete the test objectives.
[0122] This step tests each typical application system: prepare according to the prerequisites and complete the conditions and states required before the test items are implemented. Use benchmark cases for testing, and weight the test results of each benchmark case (i.e., capability score) to get the capability score of the test item. Extended cases are optional test contents for the implementation of the test items, and are tested as needed. Then, according to the test item weight W-Si, weight the capability score of each test item to get the total capability score, i.e., the test target.
[0123] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A database system application benchmark test specification design method for benchmarking multiple application systems, characterized in that: include: Step 1: Collect usage requirements for each application system in the multiple application systems; if a usage requirement includes more than two operation scenarios, decompose the usage requirement according to the operation scenario; Step 2: Extract key variable values from usage requirements based on the specified key variables; usage requirements without specified key variables are deleted; Step 3: Perform normalization operations on each key variable; construct a piece of data using the application system, operation scenario, and normalized value of the key variable; Step 4: Cluster all data pieces, and clustering is only performed on the normalized values of key variables; Step 5: Determine the application systems involved in each category, and take the minimum application system set that can cover all categories as the typical application system; Step 6: Design a benchmark test plan for a typical application system.
2. The method according to claim 1, characterized in that The operation scenarios include query, add, modify, and delete.
3. The method according to claim 1, characterized in that The normalization adopts range normalization or standard deviation normalization.
4. The method according to claim 1, characterized in that The clustering is implemented using K-means algorithm or Statistical Products and Services Solutions (SPSS) software.
5. The method according to claim 1, characterized in that After decomposing the usage requirements in step 1, further data cleaning is performed on the usage requirements to delete the incomplete usage requirements with the required key variables.
6. The method according to claim 1, characterized in that The step 6 is specifically as follows: First, each typical application system corresponds to a test item. A test item weight W-Si is configured for each test item according to the importance of the typical application system. The ability score of each test item is weighted to obtain the total ability score, i.e., the test target. Each test item consists of prerequisites, basic use cases and extended use cases; the prerequisites define the conditions and states that must be met before the basic use case test item is implemented; The basic use case consists of at least one benchmark use case and is a must-test content for the implementation of the test item; Extended use cases are optional test contents implemented as test items; A use case weight W-Ti is configured for each benchmark use case, and the corresponding typical application system is tested using the benchmark use case to obtain a capability score. The capability score of each benchmark use case is weighted to obtain the capability score of the test item.
7. The method according to claim 6, characterized in that The benchmark test case includes a case target, environment requirements, transaction requirements, execution requirements and evaluation method; The use case objectives are: to describe the typical application system simulated by the benchmark test case; The environment requirements: define the system status before test execution; The transaction requirements: describe the concept and requirements of each transaction, and define each operation sample, operation type, impact domain, expected result, and key threshold of the transaction; The execution requirements: define the test run process requirements; The evaluation method described herein uses the degree of satisfaction of user needs as the evaluation standard, and measures the ability of a database system to provide services when certain parameters are fixed.
8. A database system application benchmark test method, characterized in that: A database system application benchmark test specification design method according to any one of claims 1 to 7 is used to obtain a benchmark test plan, and a typical application system is tested using the benchmark test plan to achieve the test objectives.
Citation Information
Patent Citations
Automatic test method based on case library
CN104572449A
OSGI (Open Service Gateway Initiative) based application frame test method and system
CN105701005A
Systems and methods for repeatable database performance testing
US20070078825A1
