A database encryption and decryption performance loss testing method and device
By introducing the coordinated work of the test end, the business simulation end and the database end to be tested in the database encryption and decryption performance test, the benchmark and decryption test data are generated, and the problem of insufficient comprehensiveness and flexibility of the encryption and decryption performance evaluation in the existing technology is solved. , realizes accurate performance evaluation of encryption and decryption technology in actual business scenarios.
Patent Information
- Application Number
- CN202411127168.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-08-16
AI Technical Summary
The existing database encryption and decryption performance testing methods are difficult to accurately evaluate the actual impact of different encryption and decryption technologies on database performance. They lack comprehensiveness and flexibility and cannot simulate the real business environment, resulting in limited applicability and accuracy of the evaluation results.
A database encryption and decryption performance loss testing method is proposed. Through the collaborative work of the test end, the business simulation end and the database end to be tested, different encryption and decryption configuration information are simulated, benchmark test data and encrypted and decrypted test data are generated, and performance loss test results are calculated, and the performance loss test results are allowed. Users adjust test parameters according to their needs, which are suitable for a variety of encryption and decryption technologies and implementation methods to simulate real business scenarios.
It realizes an accurate evaluation of the performance performance of different encryption and decryption technologies in actual business scenarios, provides comprehensive and objective performance data, helps users choose the most suitable database security solution, and enhances the comprehensiveness and flexibility of testing.
Smart Images

Figure CN118672929B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of database encryption and decryption performance evaluation, and in particular to a database encryption and decryption performance loss testing method and device. Background Art
[0002] In the field of data security, database encryption and decryption technology is a key means of protecting sensitive information from unauthorized access. With the frequent occurrence of data leakage incidents and the increasingly stringent data protection regulations, more and more organizations have begun to pay attention to and apply database encryption and decryption technology. Database encryption and decryption operations usually involve complex algorithm processing, which may affect the performance of the database. Therefore, how to evaluate the impact of different encryption and decryption technologies on database performance has become an important issue.
[0003] However, when testing the database encryption and decryption performance through existing testing tools, users usually find it difficult to accurately evaluate the actual impact of different encryption and decryption technologies on database performance, which creates difficulties in selecting a suitable database security solution. Summary of the invention
[0004] In view of the above problems, the present application is proposed to provide a method and device for testing database encryption and decryption performance loss that overcomes the above problems or at least partially solves the above problems.
[0005] The present application discloses a method for testing database encryption and decryption performance loss, the method involving a test end, a business simulation end and a database end to be tested; the business simulation end pre-stores at least two encryption and decryption configuration information; the test end is used to send a first test request to the business simulation end;
[0006] The method comprises:
[0007] When receiving the first test request, the business simulation end determines the benchmark test data by testing the database end to be tested according to the first test request, and sends the benchmark test data to the test end; the test end is used to send a second test request to the business simulation end, wherein the second test request includes an identifier corresponding to the first encryption and decryption configuration information;
[0008] The business simulation end determines first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information, and sends the first encryption and decryption test data to the test end; the test end is used to send a third test request to the business simulation end, wherein the third test request includes an identifier corresponding to the second encryption and decryption configuration information;
[0009] The business simulation end determines the second encryption and decryption test data by testing the database end to be tested based on the third test request and the second encryption and decryption configuration information, and sends the second encryption and decryption test data to the test end; the test end is used to determine the performance loss test result based on the benchmark test data, the first encryption and decryption test data and the second encryption and decryption test data.
[0010] Furthermore, the step of the business simulation end determining the benchmark test data by testing the database end to be tested according to the first test request includes:
[0011] The business simulation end directly performs database insertion operations and database query operations on the data stored in the database end to be tested according to the first test request, and records the database insertion and database query processes to generate benchmark test data.
[0012] Furthermore, the step of the business simulation end determining first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information includes:
[0013] The business simulation end generates first encryption and decryption test data by performing database encryption insertion operations and database decryption query operations on the data stored in the database end to be tested according to the second test request and the first encryption and decryption configuration information, and recording the database encryption insertion and database decryption query processes.
[0014] Furthermore, the step of the business simulation end determining the second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information includes:
[0015] The business simulation end generates second encryption and decryption test data by performing database encryption insertion operations and database decryption query operations on the data stored in the database end to be tested according to the second encryption and decryption test request and the second encryption and decryption configuration information, and recording the database encryption insertion and database decryption query processes.
[0016] Furthermore, the service simulation terminal is preset with an encryption and decryption component; the first encryption and decryption configuration information includes an identifier corresponding to the encryption and decryption component;
[0017] The step of the business simulation end determining first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information includes:
[0018] The business simulation end performs an encryption and decryption test on the database end to be tested through the encryption and decryption component according to the second test request and the first encryption and decryption configuration information to determine first encryption and decryption test data.
[0019] Furthermore, the method also involves a proxy gateway end; the first encryption and decryption configuration information includes an identifier corresponding to the proxy gateway end;
[0020] The step of the business simulation end determining first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information includes:
[0021] The business simulation end performs an encryption and decryption test on the database end to be tested through the proxy gateway end according to the second test request and the first encryption and decryption configuration information to determine first encryption and decryption test data.
[0022] Furthermore, the database to be tested is preset with a TDE plug-in; the first encryption and decryption configuration information includes an identifier corresponding to the TDE plug-in;
[0023] The step of the business simulation end determining first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information includes:
[0024] The business simulation end performs an encryption and decryption test on the database end to be tested through the TDE plug-in according to the second test request and the first encryption and decryption configuration information to determine first encryption and decryption test data.
[0025] The present application also discloses a method for testing database encryption and decryption performance loss, the method involving a test end, a business simulation end and a database end to be tested; the business simulation end pre-stores at least two encryption and decryption configuration information;
[0026] The method comprises:
[0027] When starting the test, the test end sends a first test request to the business simulation end; the business simulation end is used to determine the benchmark test data by testing the database end to be tested according to the first test request, and send the benchmark test data to the test end;
[0028] The test end sends a second test request to the business simulation end, wherein the second test request includes an identifier corresponding to the first encryption and decryption configuration information; the business simulation end is used to determine first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information, and send the first encryption and decryption test data to the test end;
[0029] The test end sends a third test request to the business simulation end, wherein the third test request includes an identifier corresponding to the second encryption and decryption configuration information; the business simulation end is used to determine second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information, and send the second encryption and decryption test data to the test end;
[0030] The test end determines a performance loss test result based on the benchmark test data, the first encryption and decryption test data, and the second encryption and decryption test data.
[0031] Further, the step of determining the performance loss test result according to the benchmark test data, the first encryption and decryption test data and the second encryption and decryption test data by the test end includes:
[0032] The test end determines first performance loss data according to the benchmark test data and the first encryption and decryption test data;
[0033] The test end determines second performance loss data according to the benchmark test data and the second encryption and decryption test data;
[0034] The test end determines a performance loss test result based on the first performance loss data and the second performance loss data.
[0035] The present application also discloses a database encryption and decryption performance loss test device, the device involves a test end, a business simulation end and a database end to be tested; the business simulation end pre-stores at least two encryption and decryption configuration information; the test end is used to send a first test request to the business simulation end;
[0036] The device comprises:
[0037] A benchmark test module, configured to, when receiving the first test request, determine benchmark test data by testing the database end to be tested according to the first test request, and send the benchmark test data to the test end; the test end is configured to send a second test request to the business simulation end, wherein the second test request includes an identifier corresponding to the first encryption and decryption configuration information;
[0038] A first encryption and decryption test module, configured to determine first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information, and send the first encryption and decryption test data to the test end; the test end is configured to send a third test request to the business simulation end, wherein the third test request includes an identifier corresponding to the second encryption and decryption configuration information;
[0039] The second encryption and decryption test module is used to determine the second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information, and send the second encryption and decryption test data to the test end; the test end is used to determine the performance loss test result based on the benchmark test data, the first encryption and decryption test data and the second encryption and decryption test data.
[0040] This application has the following advantages:
[0041] In an embodiment of the present application, compared with testing the database encryption and decryption performance through existing testing tools, it is usually difficult for users to accurately evaluate the actual impact of different encryption and decryption technologies on database performance. The present application provides a database encryption and decryption performance loss testing method, the method involving a test end, a business simulation end and a database end to be tested; the business simulation end pre-stores at least two encryption and decryption configuration information; the test end is used to send a first test request to the business simulation end; the method includes: when receiving the first test request, the business simulation end determines benchmark test data by testing the database end to be tested according to the first test request, and sends the benchmark test data to the test end; the test end is used to send a second test request to the business simulation end, wherein the second test request Including an identifier corresponding to the first encryption and decryption configuration information; the business simulation end determines the first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information, and sends the first encryption and decryption test data to the test end; the test end is used to send a third test request to the business simulation end, wherein the third test request includes an identifier corresponding to the second encryption and decryption configuration information; the business simulation end determines the second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information, and sends the second encryption and decryption test data to the test end; the test end is used to determine the performance loss test result based on the benchmark test data, the first encryption and decryption test data and the second encryption and decryption test data. The present application solves the technical problem that it is difficult for the prior art to accurately evaluate the actual impact of different encryption and decryption technologies on database performance, and achieves the technical effect of accurately evaluating the performance of different encryption and decryption technologies in actual business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] Figure 1 It is a flowchart of a method for testing database encryption and decryption performance loss provided by an embodiment of the present application;
[0044] Figure 2 It is a structural block diagram of a database encryption and decryption performance loss testing device provided by an embodiment of the present application;
[0045] Figure 3 It is a schematic diagram of a test framework structure for implementing a database encryption and decryption performance loss test method in one embodiment of the present application;
[0046] Figure 4 It is a schematic diagram of a data transmission structure for performing a database encryption and decryption performance loss test through a direct connection test in an embodiment of the present application;
[0047] Figure 5 It is a schematic diagram of a data transmission structure for performing a database encryption and decryption performance loss test through an encryption and decryption component in an embodiment of the present application;
[0048] Figure 6 It is a schematic diagram of a data transmission structure for performing a database encryption and decryption performance loss test through a proxy gateway in an embodiment of the present application;
[0049] Figure 7 This is a schematic diagram of a data transmission structure for performing a database encryption and decryption performance loss test through a TDE plug-in in an embodiment of the present application;
[0050] Figure 8 is a performance index parameter table of test data in an embodiment of the present application;
[0051] Fig. 9 It is a structural diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the objects, features and advantages of the present application more obvious and understandable, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0053] The inventors have found through analysis of the prior art that: first, the existing database encryption and decryption performance testing methods are usually unable to fully cover different database encryption and decryption technologies and implementations. These methods often focus on the performance evaluation of a single technology or implementation, such as focusing on evaluating the processing speed of a specific encryption and decryption algorithm or the response time of a specific database operation; or focusing on a specific type of database system (such as a relational database) while ignoring the performance evaluation of other types (such as a NoSQL database). Although these methods can provide performance indicators to a certain extent, they are usually lacking in comprehensiveness and ignoring other possible encryption and decryption solutions.
[0054] Second, existing evaluation tools and methods often lack flexibility and cannot be adjusted according to different business needs and test scenarios, resulting in users being unable to conduct customized performance tests based on their specific needs, which limits the applicability and accuracy of the evaluation results.
[0055] Third, many existing evaluation methods cannot effectively simulate the actual business environment, so that the test results may not accurately reflect the application in real business scenarios.
[0056] Therefore, the existing database encryption and decryption performance evaluation technology has the following main shortcomings: lack of comprehensiveness, insufficient flexibility and inability to simulate the real business environment.
[0057] Based on the above systematic analysis of the prior art by the inventors, in response to these problems, the existing market lacks a unified and comprehensive performance testing framework that can cover a variety of database encryption and decryption technologies and implementation methods and provide flexible test parameter configuration. For example, some existing evaluation tools may not be able to simultaneously compare the performance of different encryption methods such as encryption and decryption components (SDK integration, JDBC driver encryption, aspect-oriented programming encryption, MyBatis-based encryption), proxy gateway encryption components, and TDE (Transparent Data Encryption). In addition, existing evaluation tools are often unable to be flexibly configured according to different business needs and test scenarios, such as adjusting the number of threads, data size, and execution time.
[0058] The purpose of this application is to provide a comprehensive and flexible database encryption and decryption performance loss testing method and device that can simulate a real business environment. It is not only applicable to a variety of encryption and decryption technologies and implementation methods, allowing users to comprehensively and accurately evaluate the impact of different encryption and decryption technologies on database performance, but also allows users to adjust test parameters according to their specific needs.
[0059] Reference Figure 1, shows a database encryption and decryption performance loss test method provided by an embodiment of the present application, the method involves a test end, a business simulation end and a database end to be tested; the business simulation end pre-stores at least two encryption and decryption configuration information; the test end is used to send a first test request to the business simulation end;
[0060] The method comprises:
[0061] S110. When receiving the first test request, the business simulation end determines benchmark test data by testing the database end to be tested according to the first test request, and sends the benchmark test data to the test end; the test end is used to send a second test request to the business simulation end, wherein the second test request includes an identifier corresponding to the first encryption and decryption configuration information;
[0062] S120, the business simulation end determines first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information, and sends the first encryption and decryption test data to the test end; the test end is used to send a third test request to the business simulation end, wherein the third test request includes an identifier corresponding to the second encryption and decryption configuration information;
[0063] S130. The business simulation end determines the second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information, and sends the second encryption and decryption test data to the test end; the test end is used to determine the performance loss test result based on the benchmark test data, the first encryption and decryption test data and the second encryption and decryption test data.
[0064] In an embodiment of the present application, compared with testing the database encryption and decryption performance through existing testing tools, it is usually difficult for users to accurately evaluate the actual impact of different encryption and decryption technologies on database performance. The present application provides a database encryption and decryption performance loss testing method, the method involving a test end, a business simulation end and a database end to be tested; the business simulation end pre-stores at least two encryption and decryption configuration information; the test end is used to send a first test request to the business simulation end; the method includes: when receiving the first test request, the business simulation end determines benchmark test data by testing the database end to be tested according to the first test request, and sends the benchmark test data to the test end; the test end is used to send a second test request to the business simulation end, wherein the second test request Including an identifier corresponding to the first encryption and decryption configuration information; the business simulation end determines the first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information, and sends the first encryption and decryption test data to the test end; the test end is used to send a third test request to the business simulation end, wherein the third test request includes an identifier corresponding to the second encryption and decryption configuration information; the business simulation end determines the second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information, and sends the second encryption and decryption test data to the test end; the test end is used to determine the performance loss test result based on the benchmark test data, the first encryption and decryption test data and the second encryption and decryption test data. The present application solves the technical problem that it is difficult for the prior art to accurately evaluate the actual impact of different encryption and decryption technologies on database performance, and achieves the technical effect of accurately evaluating the performance of different encryption and decryption technologies in actual business scenarios.
[0065] Next, a method for testing the performance loss of database encryption and decryption in this exemplary embodiment will be further described.
[0066] It should be noted that the test end can simulate a large number of test requests initiated by users to the Web business system, and send the test requests to the business simulation end through the HTTP protocol, so that the business simulation end triggers the execution of database operations such as insertion, update and query.
[0067] Reference Figure 3-7The test end involved in the embodiment of the present application may include Apache JMeter, and may also include request tools such as loadrunner, wrk, and locust that can initiate HTTP protocol; the following takes Apache JMeter as an example to illustrate the test tool. JMeter is an open source load testing and performance testing tool that supports multiple protocols and services, and is mainly used to test the performance of Web applications. In this application, JMeter is used to simulate a large number of users initiating requests to the Web business system, thereby testing the performance and stability of the system under high traffic conditions. JMeter can evaluate performance indicators such as average response time, throughput, and error rate under different load conditions by simulating real user behavior.
[0068] The business simulation terminal provided by the present invention allows users to adjust test parameters according to their specific needs, such as the number of threads, data size, and execution time, so as to more accurately evaluate the performance of different encryption and decryption technologies in actual business scenarios. Through this method, users can obtain comprehensive, objective, and accurate performance data, helping them make more reasonable database security technology choices.
[0069] The business simulation end involved in the embodiment of the present application may include a database encryption and decryption performance test system (DBEPTS, Database Encrypt Performance Test System), and the application DEMO of DBEPTS can initiate a large number of insert, update and query database operations. In addition, DBEPTS is also easy to use. By providing a standardized HTTP interface and compatibility with common testing tools, DBEPTS enables non-professional users to easily perform complex performance tests. Whether it is a database administrator, developer or security analyst, DBEPTS can be used to conduct a comprehensive performance evaluation of its database encryption and decryption solution. DBEPTS can use testing tools (such as Apache Jmeter) to perform stress testing on its database insertion and database query interfaces. In this way, DBEPTS can provide a detailed performance analysis report, including but not limited to key performance indicators such as transaction volume per second (i.e., throughput Throughput), average response time (Average). This enables users to intuitively compare the impact of different encryption and decryption technologies on database performance, and provide data support for selecting the most suitable database security solution. Therefore, the present application uses DBEPTS to perform database encryption and decryption performance loss testing, which is not only suitable for evaluating a single encryption and decryption technology, but also can compare the performance of multiple technologies and implementation methods at the same time.
[0070] In an embodiment of the present application, the specific process of "the business simulation end determines the benchmark test data by testing the database end to be tested according to the first test request" in step S110 can be further explained in combination with the following description.
[0071] As described in the following steps, the business simulation end directly performs database insertion operations and database query operations on the data stored in the database end to be tested according to the first test request, and records the database insertion and database query processes to generate benchmark test data.
[0072] It should be noted that, refer to Figure 4 The first test request may include a direct connection test request; the business simulation end directly reads and writes the operation database, and the data read and written during the test comes from the database. The benchmark test data serves as a performance benchmark during the test process, and is used to compare the performance loss after using encryption technology.
[0073] In one embodiment of the present application, the specific process of "the business simulation end determines the first encryption and decryption test data by testing the database end to be tested based on the second test request and the first encryption and decryption configuration information" in step S120 can be further explained in combination with the following description.
[0074] As described in the following steps, the business simulation end generates first encryption and decryption test data by performing database encryption insertion operations and database decryption query operations on the data stored in the database end to be tested according to the second test request and the first encryption and decryption configuration information, and records the database encryption insertion and database decryption query processes.
[0075] It should be noted that the first encryption and decryption configuration information can cover a variety of encryption and decryption technologies and implementation methods. An important feature of the business simulation terminal is its high configurability. Users can adjust a variety of parameters according to their own test needs, including the number of threads, data size, execution time, encryption and decryption algorithms, encryption and decryption technology routes, etc. This flexibility makes the business simulation terminal not only suitable for evaluating large-scale database systems with high concurrency, but also suitable for small applications and individual developers. In addition, the business simulation terminal supports testing in different network environments and hardware configurations, further ensuring the wide applicability and accuracy of the test results.
[0076] In one embodiment of the present application, the specific process of "the business simulation end determines the second encryption and decryption test data by testing the database end to be tested based on the third test request and the second encryption and decryption configuration information" in step S130 can be further explained in combination with the following description.
[0077] As described in the following steps, the business simulation end generates second encryption and decryption test data by performing database encryption insertion operations and database decryption query operations on the data stored in the database end to be tested according to the second encryption and decryption test request and the second encryption and decryption configuration information, and recording the database encryption insertion and database decryption query processes.
[0078] It should be noted that the second encryption and decryption configuration information may also cover multiple encryption and decryption technologies and implementation methods. When testing, the second encryption and decryption configuration information may perform encryption and decryption performance loss testing using the same or different encryption and decryption technologies or implementation methods as the first encryption and decryption configuration information.
[0079] In one embodiment of the present application, the business simulation end is preset with an encryption and decryption component; the first encryption and decryption configuration information includes an identifier corresponding to the encryption and decryption component; the specific process of "the business simulation end determines the first encryption and decryption test data by testing the database end to be tested based on the second test request and the first encryption and decryption configuration information" in step S110 can be further explained in combination with the following description.
[0080] As described in the following steps, the business simulation end performs an encryption and decryption test on the database end to be tested through the encryption and decryption component according to the second test request and the first encryption and decryption configuration information to determine first encryption and decryption test data.
[0081] It should be noted that, refer to Figure 5 The first encryption and decryption configuration information can cover a variety of encryption and decryption technologies and implementation methods. Specifically, in the application.properties configuration file of the DBEPTS program, by adding the identifier corresponding to the encryption technology in the encryption and decryption component to the JDBCURL, one of JDBC driver encryption, aspect-oriented encryption, mybatis-based encryption and SDK encryption can be used to implement performance loss testing of different encryption technologies in the encryption and decryption component, and different configurations can be flexibly switched.
[0082] In one embodiment of the present application, the method also involves a proxy gateway end; the first encryption and decryption configuration information includes an identifier corresponding to the proxy gateway end; the specific process of "the business simulation end determines the first encryption and decryption test data by testing the database end to be tested based on the second test request and the first encryption and decryption configuration information" in step S110 can be further explained in combination with the following description.
[0083] As described in the following steps, the business simulation end performs an encryption and decryption test on the database end to be tested through the proxy gateway end according to the second test request and the first encryption and decryption configuration information to determine the first encryption and decryption test data.
[0084] It should be noted that, refer to Figure 6 In the application.properties configuration file of the DBEPTS program, the performance loss test based on proxy gateway technology encryption can be implemented by modifying the IP in the JDBC URL to point to the proxy gateway end, and different configurations can be flexibly switched. The proxy gateway end can be a database proxy gateway for operating the database, and can be deployed independently of DBEPTS.
[0085] In one embodiment of the present application, the database to be tested is preset with a TDE plug-in; the first encryption and decryption configuration information includes an identifier corresponding to the TDE plug-in; the specific process of "the business simulation end determines the first encryption and decryption test data by testing the database to be tested based on the second test request and the first encryption and decryption configuration information" in step S110 can be further explained in combination with the following description.
[0086] As described in the following steps, the business simulation end performs an encryption and decryption test on the database end to be tested through the TDE plug-in according to the second test request and the first encryption and decryption configuration information to determine the first encryption and decryption test data.
[0087] It should be noted that, refer to Figure 7 When the performance loss test is performed through the TDE plug-in, the business simulation end is directly connected to the database end to be tested. The data is decrypted through the TDE plug-in when reading and encrypted through the TDE plug-in when updating. The TDE plug-in is transparent and unaware of the business simulation end. During this process, DBEPTS only needs to directly initiate a database query or database insertion request to implement performance loss testing through the TDE plug-in.
[0088] It should be noted that, combined with Figure 4-7 And the description of the relevant embodiments, one of the technical ideas of the above embodiments of the present application is to be able to simultaneously perform encryption and decryption tests on the three major categories of database encryption and decryption technologies (encryption and decryption components, proxy gateway ends and TDE plug-ins correspond to the three major categories of database encryption and decryption technologies on the application side, proxy side and database side respectively): the benchmark test data is obtained through benchmark testing as a comparison basis for the above three major categories of database encryption and decryption technologies, and then the performance loss of each encryption and decryption technology is calculated separately to compare the performance of the above three major categories of database encryption and decryption technologies. It can be to compare any two of the encryption and decryption technologies and implementation methods, or to compare the performance of the above three major categories of database encryption and decryption technologies (application side, proxy side and database side) at the same time, or to compare the performance of multiple specific encryption and decryption implementation methods at the same time.
[0089] An embodiment of the present application also provides a method for testing database encryption and decryption performance loss, the method involving a test end, a business simulation end and a database end to be tested; the business simulation end pre-stores at least two encryption and decryption configuration information;
[0090] The method comprises:
[0091] When starting the test, the test end sends a first test request to the business simulation end; the business simulation end is used to determine the benchmark test data by testing the database end to be tested according to the first test request, and send the benchmark test data to the test end;
[0092] The test end sends a second test request to the business simulation end, wherein the second test request includes an identifier corresponding to the first encryption and decryption configuration information; the business simulation end is used to determine first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information, and send the first encryption and decryption test data to the test end;
[0093] The test end sends a third test request to the business simulation end, wherein the third test request includes an identifier corresponding to the second encryption and decryption configuration information; the business simulation end is used to determine second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information, and send the second encryption and decryption test data to the test end;
[0094] The test end determines a performance loss test result based on the benchmark test data, the first encryption and decryption test data, and the second encryption and decryption test data.
[0095] It should be noted that the test end can not only simulate a large number of users initiating requests to the Web business system, but also process the test data returned by the business simulation end to obtain values such as throughput (Throughput) / average response time (Average), and generate a performance analysis report.
[0096] In one embodiment of the present application, the specific process of "the test end determining the performance loss test result based on the benchmark test data, the first encryption and decryption test data and the second encryption and decryption test data" can be further explained in combination with the following description.
[0097] As described in the following steps, the test end determines first performance loss data according to the benchmark test data and the first encryption and decryption test data;
[0098] The test end determines second performance loss data according to the benchmark test data and the second encryption and decryption test data;
[0099] The test end determines a performance loss test result based on the first performance loss data and the second performance loss data.
[0100] It should be noted that, refer to Figure 8 , showing the performance indicator parameters of the test data in any embodiment of the present application and the corresponding performance parameter interpretations.
[0101] The first performance loss data may be a performance loss percentage, and the performance loss percentage may be calculated by the following formula:
[0102] Performance loss percentage = ((BA) / B)*100%
[0103] A can be benchmark test data, including encryption and decryption components (SDK integration, JDBC driver encryption, aspect-oriented programming encryption, MyBatis-based encryption), proxy gateway encryption, and throughput (Throughput) and average response time (Average) in TDE mode using test tools (such as Apache Jmeter);
[0104] B may be the first encryption and decryption test data, including: throughput (Throughput) and average response time (Average) using a test tool (such as Apache Jmeter) under a native JDBC driver.
[0105] The specific generation process of the second encryption and decryption test data can refer to the generation process of the first encryption and decryption test data in any embodiment of the present application. The second performance loss data can be a performance loss percentage, and its specific calculation method can refer to the calculation method of the first performance loss data in any embodiment of the present application. The performance loss test result can include a comparison result.
[0106] The above is a description of the method embodiment of the present application. As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0107] Reference Figure 2 , shows a database encryption and decryption performance loss test device provided by an embodiment of the present application, the device involves a test end, a business simulation end and a database end to be tested; the business simulation end pre-stores at least two encryption and decryption configuration information; the test end is used to send a first test request to the business simulation end;
[0108] The device comprises:
[0109] The benchmark test module 210 is used for, when receiving the first test request, determining benchmark test data by testing the database end to be tested according to the first test request, and sending the benchmark test data to the test end; the test end is used for sending a second test request to the business simulation end, wherein the second test request includes an identifier corresponding to the first encryption and decryption configuration information;
[0110] The first encryption and decryption test module 220 is used to determine the first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information, and send the first encryption and decryption test data to the test end; the test end is used to send a third test request to the business simulation end, wherein the third test request includes an identifier corresponding to the second encryption and decryption configuration information;
[0111] The second encryption and decryption test module 230 is used to determine the second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information, and send the second encryption and decryption test data to the test end; the test end is used to determine the performance loss test result based on the benchmark test data, the first encryption and decryption test data and the second encryption and decryption test data.
[0112] As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0113] An embodiment of the present application provides a database encryption and decryption performance loss test system, the system comprising a test end, a business simulation end and a database end to be tested; the business simulation end pre-stores at least two encryption and decryption configuration information;
[0114] The system comprises:
[0115] The test end is used to send a first test request to the service simulation end;
[0116] The business simulation end is used to determine benchmark test data by testing the database end to be tested according to the first test request, and send the benchmark test data to the test end;
[0117] The test end is used to send a second test request to the service simulation end, wherein the second test request includes an identifier corresponding to the first encryption and decryption configuration information;
[0118] The business simulation end is used to determine first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information, and send the first encryption and decryption test data to the test end;
[0119] The test end is used to send a third test request to the service simulation end, wherein the third test request includes an identifier corresponding to the second encryption and decryption configuration information;
[0120] The business simulation end is used to determine second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information, and send the second encryption and decryption test data to the test end;
[0121] The test end is used to determine a performance loss test result based on the benchmark test data, the first encryption and decryption test data, and the second encryption and decryption test data.
[0122] It should be noted that the test end, the business simulation end and the database end to be tested in the embodiment of the system and the system architecture formed by them can be referred to in Figure 3-7 .
[0123] Reference Fig. 9 , shows a computer device for a database encryption and decryption performance loss test method provided by an embodiment of the present application, which may specifically include the following:
[0124] The computer device 12 is in the form of a general-purpose computing device, and the components of the computer device 12 may include but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 connecting different system components (including the memory 28 and the processing unit 16).
[0125] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, an Audio Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0126] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0127] Memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM 30) and / or cache 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (commonly referred to as a "hard drive"). Although Fig. 9 Not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42, which are configured to perform the functions of various embodiments of the present invention.
[0128] A program / utility 40 having a set (at least one) of program modules 42 may be stored in, for example, a memory, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0129] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, cameras, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through the I / O interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs)), wide area networks (WANs), and / or public networks (e.g., the Internet) through a network adapter 20. Fig. 9 As shown, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be understood that although Fig. 9 Not shown, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, processing unit 16, external disk drive arrays, RAID systems, tape drives, and storage systems 34, etc.
[0130] The processing unit 16 executes various functional applications and data processing by running the programs stored in the memory 28, for example, implementing a database encryption and decryption performance loss testing method provided by an embodiment of the present invention.
[0131] That is, when the processing unit 16 executes the above program, the following is achieved:
[0132] S110. When receiving the first test request, the business simulation end determines benchmark test data by testing the database end to be tested according to the first test request, and sends the benchmark test data to the test end; the test end is used to send a second test request to the business simulation end, wherein the second test request includes an identifier corresponding to the first encryption and decryption configuration information;
[0133] S120, the business simulation end determines first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information, and sends the first encryption and decryption test data to the test end; the test end is used to send a third test request to the business simulation end, wherein the third test request includes an identifier corresponding to the second encryption and decryption configuration information;
[0134] S130. The business simulation end determines the second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information, and sends the second encryption and decryption test data to the test end; the test end is used to determine the performance loss test result based on the benchmark test data, the first encryption and decryption test data and the second encryption and decryption test data.
[0135] In an embodiment of the present invention, the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, a database encryption and decryption performance loss test method provided in all embodiments of the present application is implemented:
[0136] That is, when the program is executed by the processor:
[0137] S110. When receiving the first test request, the business simulation end determines benchmark test data by testing the database end to be tested according to the first test request, and sends the benchmark test data to the test end; the test end is used to send a second test request to the business simulation end, wherein the second test request includes an identifier corresponding to the first encryption and decryption configuration information;
[0138] S120, the business simulation end determines first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information, and sends the first encryption and decryption test data to the test end; the test end is used to send a third test request to the business simulation end, wherein the third test request includes an identifier corresponding to the second encryption and decryption configuration information;
[0139] S130. The business simulation end determines the second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information, and sends the second encryption and decryption test data to the test end; the test end is used to determine the performance loss test result based on the benchmark test data, the first encryption and decryption test data and the second encryption and decryption test data.
[0140] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device or device.
[0141] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0142] The computer program code for performing the operation of the present invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other.
[0143] It can be seen from the above embodiments that the overall architecture design of the DBEPTS system, the implementation of the multi-mode test environment, the HTTP interface design, the flexible test parameter configuration, and the selection and analysis methods of performance indicators, these design and implementation details constitute the core innovation of this application and provide important technological progress in the field of database encryption and decryption performance evaluation.
[0144] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0145] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0146] The above is a detailed introduction to a database encryption and decryption performance loss testing method and device provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A database encryption and decryption performance loss testing method, characterized in that: The method involves a test end, a business simulation end and a database end to be tested; the business simulation end pre-stores at least two types of encryption and decryption configuration information; The test end is used to send a first test request to the service simulation end; The method comprises: When receiving the first test request, the business simulation end determines the benchmark test data by testing the database end to be tested according to the first test request, and sends the benchmark test data to the test end; the test end is used to send a second test request to the business simulation end, wherein the second test request includes an identifier corresponding to the first encryption and decryption configuration information; The business simulation end determines first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information, and sends the first encryption and decryption test data to the test end; the test end is used to send a third test request to the business simulation end, wherein the third test request includes an identifier corresponding to the second encryption and decryption configuration information; The business simulation end determines second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information, and sends the second encryption and decryption test data to the test end; the test end is used to determine a performance loss test result according to the benchmark test data, the first encryption and decryption test data, and the second encryption and decryption test data; The step of the business simulation end determining the benchmark test data by testing the database end to be tested according to the first test request includes: The business simulation end directly performs a database insertion operation and a database query operation on the data stored in the database end to be tested according to the first test request, and records the database insertion and database query process to generate benchmark test data; The step of the business simulation end determining the first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information includes: The business simulation end generates first encryption and decryption test data by performing a database encryption insertion operation and a database decryption query operation on the data stored in the database end to be tested according to the second test request and the first encryption and decryption configuration information, and recording the database encryption insertion and database decryption query process; The step of the business simulation end determining the second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information includes: The business simulation end generates second encryption and decryption test data by performing database encryption insertion operations and database decryption query operations on the data stored in the database end to be tested according to the third test request and the second encryption and decryption configuration information, and recording the database encryption insertion and database decryption query processes.
2. The testing method according to claim 1, characterized in that: The service simulation terminal is preset with an encryption and decryption component; the first encryption and decryption configuration information includes an identifier corresponding to the encryption and decryption component; The step of the business simulation end determining first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information includes: The business simulation end performs an encryption and decryption test on the database end to be tested through the encryption and decryption component according to the second test request and the first encryption and decryption configuration information to determine first encryption and decryption test data.
3. The testing method according to claim 1, characterized in that: The method further involves a proxy gateway end; the first encryption and decryption configuration information includes an identifier corresponding to the proxy gateway end; The step of the business simulation end determining first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information includes: The business simulation end performs an encryption and decryption test on the database end to be tested through the proxy gateway end according to the second test request and the first encryption and decryption configuration information to determine first encryption and decryption test data.
4. The testing method according to claim 1, characterized in that: The database to be tested is preset with a TDE plug-in; the first encryption and decryption configuration information includes an identifier corresponding to the TDE plug-in; The step of the business simulation end determining first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information includes: The business simulation end performs an encryption and decryption test on the database end to be tested through the TDE plug-in according to the second test request and the first encryption and decryption configuration information to determine first encryption and decryption test data.
5. The testing method according to claim 1, characterized in that: The step of determining, by the test end, a performance loss test result according to the benchmark test data, the first encryption and decryption test data, and the second encryption and decryption test data comprises: The test end determines first performance loss data according to the benchmark test data and the first encryption and decryption test data; The test end determines second performance loss data according to the benchmark test data and the second encryption and decryption test data; The test end determines a performance loss test result based on the first performance loss data and the second performance loss data.
6. A database encryption and decryption performance loss test device, characterized in that: The device is used to implement the method according to any one of claims 1 to 5; the device involves a test end, a business simulation end and a database end to be tested; the business simulation end pre-stores at least two types of encryption and decryption configuration information; The test end is used to send a first test request to the service simulation end; The device comprises: A benchmark test module, configured to, when receiving the first test request, determine benchmark test data by testing the database end to be tested according to the first test request, and send the benchmark test data to the test end; the test end is configured to send a second test request to the business simulation end, wherein the second test request includes an identifier corresponding to the first encryption and decryption configuration information; A first encryption and decryption test module, configured to determine first encryption and decryption test data by testing the database end to be tested according to the second test request and the first encryption and decryption configuration information, and send the first encryption and decryption test data to the test end; the test end is configured to send a third test request to the business simulation end, wherein the third test request includes an identifier corresponding to the second encryption and decryption configuration information; The second encryption and decryption test module is used to determine the second encryption and decryption test data by testing the database end to be tested according to the third test request and the second encryption and decryption configuration information, and send the second encryption and decryption test data to the test end; the test end is used to determine the performance loss test result based on the benchmark test data, the first encryption and decryption test data and the second encryption and decryption test data.
