Database substitution capability testing method and device and storage medium

Through comprehensive evaluation of the compatibility, performance and transformation costs of the selected database, a multi-attribute decision-making method is adopted to solve the technical problems of how to choose suitable alternatives in database localization, and a scientific choice of database replacement is provided.

CN119127931APending Publication Date: 2024-12-13STATE GRID INFORMATION & TELECOMM GRP CO LTD +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410835371.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the process of localization of databases, how to effectively evaluate and select a domestic database that can meet the needs of the business system and conduct alternative capabilities testing is a challenge.

Method used

By comparing the compatibility of the data types, naming rules, syntax rules and functions of the database to be selected with the current database, benchmark performance tests and business scenario performance tests are carried out, combining comprehensive performance, transformation costs and functional tests, and using multiple based on comprehensive weights Attribute decision-making method, assessing the alternative capabilities of the database to be selected.

Benefits of technology

A comprehensive evaluation of the database to be selected is achieved, providing a comprehensive consideration of the selection of reference solutions suitable for the replacement of the current database, ensuring compatibility, performance and modification costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127931A_ABST
    Figure CN119127931A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a database substitution capability testing method and device and a storage medium, and the method comprises the steps: respectively and correspondingly comparing a data type, a naming rule, a grammar rule and a function of a to-be-selected database with a data type, a naming rule, a grammar rule and a function of a current database, and obtaining a compatibility index result; performing benchmark performance test on the to-be-selected database by using the test tool to obtain a benchmark performance index result; performing performance testing on the to-be-selected database under the specific business scene by utilizing an automatic testing tool to obtain a business scene performance index result; determining a comprehensive performance index result according to the reference performance index result and the service scene performance index result; and based on the compatibility index result, the comprehensive performance index result, a preset transformation cost index result and a function index result obtained through a function test, determining a substitution capability index result of the to-be-selected database. A basis is provided for database replacement by comprehensively testing the replacement capability of the to-be-selected database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of database technology, and in particular to a method, device and storage medium for testing database substitution capability. Background Art

[0002] As the key infrastructure of business systems, databases are becoming more and more localized. For business systems that have adopted non-localized databases, it is a general trend to replace them with localized databases. Due to the wide variety of domestic databases, how to test and evaluate the replacement capabilities of domestic databases and select databases that can meet the needs of business systems is a problem that needs to be solved in this field. Summary of the invention

[0003] In view of this, the purpose of the embodiments of the present application is to provide a database replacement capability testing method, device and storage medium.

[0004] Based on the above purpose, the embodiment of the present application provides a database replacement capability testing method, including:

[0005] Compare the data types, naming rules, grammatical rules, and functions of the candidate database with those of the current database to obtain compatibility index results;

[0006] Using a preset test tool to perform a benchmark performance test on the candidate database to obtain a benchmark performance indicator result;

[0007] Using a preset automated testing tool to perform performance testing on the candidate database in a specific business scenario to obtain business scenario performance indicator results;

[0008] Determine the comprehensive performance indicator results based on the benchmark performance indicator results and business scenario performance indicator results;

[0009] Based on the compatibility index result, the comprehensive performance index result, the preset transformation cost index result and the functional index result obtained through functional testing, the replacement capability index result of the candidate database is determined.

[0010] Optionally, the data type, naming rule, grammatical rule, and function of the candidate database are respectively compared with the data type, naming rule, grammatical rule, and function of the current database to obtain compatibility index results, including:

[0011] According to a preset level matching rule, the data type of the candidate database is compared with the data type of the current database to determine the data type compatibility index value of the candidate database;

[0012] According to the naming rule of the candidate database and the naming rule of the current database, a compatibility index value of the naming rule of the candidate database is determined according to a preset compatibility calculation rule;

[0013] According to preset grammatical compatibility rules, the grammatical rules of the candidate database are compared with the grammatical rules of the current database to determine the grammatical rule compatibility index value of the candidate database;

[0014] According to a preset function compatibility rule, the function of the candidate database is compared with the function of the current database to determine the function compatibility index value of the candidate database;

[0015] The compatibility index result is determined based on the data type compatibility index value and the corresponding weight, the naming rule compatibility index value and the corresponding weight, the grammar rule compatibility index value and the corresponding weight, and the function compatibility index value and the corresponding weight.

[0016] Optionally, comparing the data type of the candidate database with the data type of the current database according to a preset level matching rule to determine the data type compatibility index value of the candidate database includes:

[0017] According to a preset level matching rule, determining the compatibility score of each data type in the candidate database, including: for each data type in the candidate database, matching the data type with each data type in the current database in turn to obtain a matching degree, and determining the compatibility score of the data type according to the matching degree and the level matching rule;

[0018] Based on the compatibility score of each data type, the data type compatibility index value is determined.

[0019] Optionally, determining the compatibility index value of the naming rule of the candidate database according to the naming rule of the candidate database and the naming rule of the current database and according to a preset compatibility calculation rule includes:

[0020] Calculate the naming rule compatibility index value according to the difference between the naming rule set of the candidate database and the naming rule set of the current database, the difference between the naming rule set of the current database and the naming rule set of the candidate database, and the number of elements in the two naming rule sets; wherein the naming rule set includes identifiers and reserved words;

[0021] The step of comparing the grammatical rules of the candidate database with the grammatical rules of the current database according to the preset grammatical compatibility rules to determine the grammatical rule compatibility index value of the candidate database includes:

[0022] Determining the compatibility score of each grammatical point in the candidate database according to a preset grammatical compatibility rule, including: for each grammatical point in the candidate database, comparing the grammatical point with a corresponding grammatical point in the current database to obtain a comparison result of whether the grammatical points are the same, and determining the compatibility score of the grammatical point according to the comparison result;

[0023] Determining the compatibility index value of the grammar rule based on the compatibility score of each grammar point;

[0024] The comparing the function of the candidate database with the function of the current database according to the preset function compatibility rule to determine the function compatibility index value of the candidate database includes:

[0025] Determining the compatibility score of each function in the candidate database according to the function compatibility rule, including: for each function in the candidate database, searching the current database for a function with the same function as the function, and determining the compatibility score of the function according to the search result;

[0026] Based on the compatibility score of each function, the function compatibility index value is determined.

[0027] Optionally, based on the compatibility index result, the comprehensive performance index result, the preset transformation cost index result and the functional index result obtained through the functional test, determining the replacement capability index result of the candidate database includes:

[0028] A multi-attribute decision-making method based on comprehensive weights is used to calculate the compatibility index results, comprehensive performance index results, transformation cost index results and functional index results to obtain the alternative capacity index results; wherein the comprehensive weight is calculated using a linear weighted average method based on subjective weights and objective weights, the subjective weight is calculated based on a hierarchical analysis method and an expert survey method, and the objective weight is calculated based on an entropy weight method.

[0029] The present application also provides a database replacement capability testing device, including:

[0030] The compatibility test module is used to compare the data types, naming rules, grammatical rules, and functions of the candidate database with the data types, naming rules, grammatical rules, and functions of the current database to obtain compatibility index results;

[0031] A benchmark performance testing module, used to perform a benchmark performance test on the candidate database using a preset testing tool to obtain a benchmark performance indicator result;

[0032] A business performance testing module is used to use a preset automated testing tool to perform a performance test on the candidate database under a specific business scenario to obtain a business scenario performance indicator result;

[0033] A comprehensive performance calculation module is used to determine the comprehensive performance indicator results based on the benchmark performance indicator results and the business scenario performance indicator results;

[0034] The alternative capability test module is used to determine the alternative capability indicator result of the candidate database based on the compatibility indicator result, the comprehensive performance indicator result, the preset transformation cost indicator result and the functional indicator result obtained through functional testing.

[0035] Optionally, the compatibility testing module is used to compare the data type of the candidate database with the data type of the current database according to a preset level matching rule to determine the data type compatibility index value of the candidate database; determine the naming rule compatibility index value of the candidate database according to the naming rule of the candidate database and the naming rule of the current database according to a preset compatibility calculation rule; compare the grammatical rules of the candidate database with the grammatical rules of the current database according to a preset grammar compatibility rule to determine the grammar rule compatibility index value of the candidate database; compare the functions of the candidate database with the functions of the current database according to a preset function compatibility rule to determine the function compatibility index value of the candidate database; and determine the compatibility index result according to the data type compatibility index value and the corresponding weight, the naming rule compatibility index value and the corresponding weight, the grammar rule compatibility index value and the corresponding weight, and the function compatibility index value and the corresponding weight.

[0036] Optionally, the compatibility testing module is used to determine the compatibility score of each data type in the candidate database according to a preset level matching rule, including: for each data type in the candidate database, matching the data type with each data type in the current database in turn, and determining the compatibility score of the data type according to the degree of matching and the level matching rule; and determining the data type compatibility index value based on the compatibility score of each data type.

[0037] Optionally, the compatibility testing module is used to calculate the naming rule compatibility index value according to the difference between the naming rule set of the candidate database and the naming rule set of the current database, the difference between the naming rule set of the current database and the naming rule set of the candidate database, and the number of elements in the two naming rule sets; wherein the naming rule set includes identifiers and reserved words; according to the preset grammar compatibility rules, the compatibility score of each grammar point in the candidate database is determined, including: for each grammar point in the candidate database, the grammar point is compared with the corresponding grammar point in the current database to obtain a comparison result of whether the grammar points are the same, and the compatibility score of the grammar point is determined according to the comparison result; based on the compatibility score of each grammar point, the grammar rule compatibility index value is determined; and according to the function compatibility rule, the compatibility score of each function in the candidate database is determined, including: for each function in the candidate database, whether there is a function with the same function as the function in the current database, and the compatibility score of the function is determined according to the search result; based on the compatibility score of each function, the function compatibility index value is determined.

[0038] Optionally, the alternative capability test module is used to calculate the compatibility index results, comprehensive performance index results, transformation cost index results and functional index results using a multi-attribute decision-making method based on comprehensive weights to obtain the alternative capability index results; wherein the comprehensive weight is calculated using a linear weighted average method based on subjective weights and objective weights, the subjective weight is calculated based on a hierarchical analysis method and an expert survey method, and the objective weight is calculated based on an entropy weight method.

[0039] An embodiment of the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the database replacement capability testing method.

[0040] From the above description, it can be seen that the database replacement capability testing method, device and storage medium provided in the embodiments of the present application comprehensively test and evaluate the candidate database from the aspects of compatibility, performance, transformation cost, function verification, etc., and adopt a multi-attribute decision-making method based on comprehensive weights to quantify the indicator results of various aspects, and obtain the replacement capability indicator results of the candidate database. Combined with the replacement capability indicator results of each candidate database, a database suitable for replacing the current database is selected, thereby providing a reference solution for database replacement. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 A schematic diagram of a method flow of an embodiment of the present application;

[0043] Figure 2 A schematic diagram of a test framework for an embodiment of the present application;

[0044] Figure 3 A schematic diagram of a process for determining an alternative capability indicator result according to an embodiment of the present application;

[0045] Figure 4 This is a block diagram of the device structure of an embodiment of the present application;

[0046] Figure 5 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0048] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to represent relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0049] like Figure 1 , 2 As shown, the present application provides a database replacement capability testing method, comprising:

[0050] S101: Compare the data type, naming rule, grammatical rule, and function of the candidate database with the data type, naming rule, grammatical rule, and function of the current database to obtain a compatibility index result;

[0051] In this embodiment, in order to select a target database suitable for replacing the current database from multiple candidate databases, it is necessary to test and evaluate the candidate databases comprehensively based on multiple indicators such as compatibility, performance, transformation cost, and function.

[0052] Among them, in terms of compatibility, the compatibility index results are obtained by comparing the data types, naming rules, grammatical rules, and functions of the candidate database with those of the current database, that is, the compatibility of the candidate database with the current database is comprehensively judged from the aspects of data types, naming rules, grammatical rules, and functions.

[0053] In some embodiments, the compatibility index results are obtained by comparing data types, naming rules, grammatical rules and functions, including:

[0054] According to the preset level matching rules, the data type of the candidate database is compared with the data type of the current database to determine the data type compatibility index value of the candidate database;

[0055] According to the naming rule of the candidate database and the naming rule of the current database, a compatibility index value of the naming rule of the candidate database is determined according to a preset compatibility calculation rule;

[0056] According to the preset grammatical compatibility rules, the grammatical rules of the candidate database are compared with the grammatical rules of the current database to determine the grammatical rule compatibility index value of the candidate database;

[0057] According to the preset function compatibility rules, the function of the candidate database is compared with the function of the current database to determine the function compatibility index value of the candidate database;

[0058] The compatibility index result is determined based on the data type compatibility index value and the corresponding weight, the naming rule compatibility index value and the corresponding weight, the syntax rule compatibility index value and the corresponding weight, and the function compatibility index value and the corresponding weight.

[0059] In this embodiment, the data type of the database to be selected is matched with the data type of the current database, and the data type compatibility index value is determined according to the matching result and the set level matching rule; the naming rule of the database to be selected and the naming rule of the current database are calculated according to the set compatibility calculation rule to obtain the naming rule compatibility index value; the grammatical rule of the database to be selected is compared with the grammatical rule of the current database, and the grammatical rule compatibility index value is determined according to the comparison result and the set grammatical compatibility rule; the function of the database to be selected is compared with the function of the current database, and the function compatibility index value is determined according to the comparison result and the set function compatibility rule; and the data type compatibility index value, the naming rule compatibility index value, the grammatical rule compatibility index value, the function compatibility index value and the weights corresponding to each index item are combined to comprehensively determine the compatibility index result.

[0060] In some embodiments, according to a preset level matching rule, the data type of the candidate database is compared with the data type of the current database to determine the data type compatibility index value of the candidate database, including:

[0061] According to the preset level matching rule, determining the compatibility score of each data type in the candidate database, including: for each data type in the candidate database, matching the data type with each data type in the current database in turn to obtain a matching degree, and determining the compatibility score of the data type according to the matching degree and the level matching rule;

[0062] Based on the compatibility score of each data type, a data type compatibility index value is determined.

[0063] This embodiment provides a specific method for determining the compatibility index value of a data type. As shown in Table 1, the compatibility of data types is mainly evaluated from the differences in the representation methods and semantic differences of data types. The level matching rules are pre-set, and level 1 is when the type name, maximum length and SQL general data type (such as character type, time date type, integer type, etc.) of any two data types are the same, the compatibility score of the two data types is 100%; level 2 is when the maximum length of the two data types is the same as the SQL general data type, and the type name is different, the compatibility score of the two data types is 90%; level 3 is when the type name of the two data types is the same as the SQL general data type, and the maximum length is different, the compatibility score of the two data types is 80%; level 4 is when the SQL general data type of the two data types is the same, and the maximum length and type name are different, the compatibility score of the two data types is 60%; if the type name, maximum length and SQL general data type of the two data types are not the same, the compatibility score of the two data types is 0.

[0064] Table 1 Level matching rules table

[0065]

[0066] Based on the above-mentioned level matching rules, for each data type in the selected database, traverse all data types in the current database to find data types that meet any of the above levels. After the traversal, if a data type that meets the rules shown in level 1 with the data type is found, the compatibility score of the data type is 100%; if a data type that meets the rules shown in level 2 with the data type is found, the compatibility score of the data type is 90%; if a data type that meets the rules shown in level 3 with the data type is found, the compatibility score of the data type is 80%; if a data type that meets the rules shown in level 4 with the data type is found, the compatibility score of the data type is 60%; if no data type of any level is found, the compatibility score of the data type is 0.

[0067] After determining the compatibility score of each data type in the candidate database according to the above method, the average compatibility score is calculated based on the compatibility scores of all data types as the data type compatibility index value.

[0068] In some embodiments, according to the naming rule of the candidate database and the naming rule of the current database, the naming rule compatibility index value of the candidate database is determined according to the preset compatibility calculation rule, including:

[0069] The naming rule compatibility index value is calculated according to the difference between the naming rule set of the candidate database and the naming rule set of the current database, the difference between the naming rule set of the current database and the naming rule set of the candidate database, and the number of elements in the two naming rule sets.

[0070] In this embodiment, the naming rule set of the selected database includes all identifiers and reserved words in the selected database, and the naming rule set of the current database includes all identifiers and reserved words in the current database; according to the difference set between the two naming rule sets and the size of the two naming rule sets, the naming rule compatibility index value is calculated, which is expressed as:

[0071]

[0072] Among them, X is the naming rule set of the candidate database, Y is the naming rule set of the current database, and Z is the naming rule compatibility index value. The difference between the naming rule set of the candidate database and the naming rule set of the current database, and the difference between the naming rule set of the current database and the naming rule set of the candidate database are calculated respectively, and the union of the two difference sets is calculated. The number of elements of the union is divided by the sum of the number of elements of the two naming rule sets to obtain the naming rule compatibility index value.

[0073] In some embodiments, according to preset grammatical compatibility rules, the grammatical rules of the candidate database are compared with the grammatical rules of the current database to determine the grammatical rule compatibility index value of the candidate database, including:

[0074] Determining the compatibility score of each grammatical point in the candidate database according to a preset grammatical compatibility rule, including: for each grammatical point in the candidate database, comparing the grammatical point with a corresponding grammatical point in the current database to obtain a comparison result of whether the grammatical points are the same, and determining the compatibility score of the grammatical point according to the comparison result;

[0075] Based on the compatibility score of each grammar point, a grammar rule compatibility index value is determined.

[0076] In this embodiment, database object compatibility is evaluated from two aspects: syntax compatibility and function compatibility. For syntax compatibility, each syntax point in the candidate database is compared with the corresponding syntax point in the current database to determine whether the two syntax points are the same. If they are the same, the two syntax points are compatible, and if they are not the same, the two syntax points are incompatible. In some embodiments, when the two syntax points are compatible, the compatibility score can be set to 1, and when the two syntax points are incompatible, the compatibility score can be set to 0.

[0077] As shown in Table 2, the grammatical points of the database include data types, expressions, conditional comparisons, control statements, data object types, data object operations, subroutines, etc. For example, the conditional control statements of the candidate database are compared with the conditional control statements of the current database to determine whether the syntax of the two is the same. If they are the same, the conditional control statements of the candidate database are compatible with the conditional control statements of the current database.

[0078] After determining the compatibility of each grammatical point in the candidate database with the corresponding grammatical point in the current database according to the above method, count the number of all compatible grammatical points, calculate the ratio of the number of compatible grammatical points to the number of all grammatical points in the candidate database, and obtain the grammatical rule compatibility index value.

[0079] Table 2. Example table of grammar points

[0080]

[0081]

[0082]

[0083]

[0084] In some embodiments, according to a preset function compatibility rule, the function of the candidate database is compared with the function of the current database to determine the function compatibility index value of the candidate database, including:

[0085] According to the function compatibility rule, determining the compatibility score of each function in the candidate database includes: for each function in the candidate database, searching from the current database whether there is a function with the same function as the function, and determining the compatibility score of the function according to the search result;

[0086] Based on the compatibility score of each function, a function compatibility index value is determined.

[0087] In this embodiment, for function compatibility, for each function in the candidate database, a search is made in the current database to see whether there is a function with the same function as the function. If so, the function is compatible with the corresponding function in the current database, and the compatibility score of the function can be set to 1; if not, the function is incompatible with the current database, and the compatibility score of the function can be set to 0. After determining the comparison result of whether each function in the candidate database is compatible with the current database according to the above method, the number of all compatible functions is counted, and the ratio of the number of compatible functions to the number of all functions in the candidate database is calculated to obtain the function rule compatibility index value.

[0088] In some embodiments, after determining the function rule compatibility index value and the grammar rule compatibility index value, a weighted average of the two is calculated as the database object compatibility index value.

[0089] Combination Figure 2 As shown, after determining the data type compatibility index value, the naming rule compatibility index value and the database object compatibility index value, the compatibility index result is calculated according to the weighted average method based on the value of each index and the preset weight corresponding to each index, which is expressed as:

[0090]

[0091] Among them, S is the compatibility index result, A is the data type compatibility index value, B is the naming rule compatibility index value, C is the database object compatibility index value, and α1, α2, and α3 are the weights corresponding to each index value.

[0092] S102: Performing a benchmark performance test on the candidate database using a preset test tool to obtain a benchmark performance indicator result;

[0093] In this embodiment, in order to test the benchmark performance of the candidate database, an existing database testing tool is used for testing, and the test results of each test item of the benchmark performance test are used as the benchmark performance indicator results. For example, the SysBench testing tool is used to test the performance of the candidate database in read-only, write-only, and read-write scenarios, the TPC-C benchmark testing tool is used to test the online transaction processing capability of the candidate database, and the TPC-H benchmark testing tool is used to test the query analysis capability of the candidate database.

[0094] Table 3 Performance test parameters and indicators example table

[0095]

[0096] S103: Using a preset automated testing tool to perform a performance test on the candidate database under a specific business scenario to obtain a business scenario performance indicator result;

[0097] In this embodiment, in order to test the performance of the candidate database in a specific business scenario, an automated testing tool is used to perform a performance test on the candidate database in a specific business scenario, and the test results of each test item of the performance test in the business scenario are used as the business scenario performance indicator results. For example, in the power marketing system, the electricity bill calculation scenario, the business hall payment scenario, or the collection and payment scenario are selected to perform performance testing on the candidate database. Combined with what is shown in Table 3, automated testing tools such as Jmeter and LoadRunner are used to set test parameters such as the number of concurrent connections and duration. After the test, the average response time, throughput, request failure rate and other parameters of the database to be tested in a specific business scenario are recorded.

[0098] S104: Determine a comprehensive performance indicator result according to the benchmark performance indicator result and the business scenario performance indicator result;

[0099] In this embodiment, after determining the benchmark performance index results and the business scenario performance index results, the entropy weight method is used to calculate the comprehensive performance index results of the candidate database, that is, the test results of all test items of the comprehensive benchmark performance test and the test results of all test items of the business scenario performance test, and the comprehensive performance index results are determined by the entropy weight method. Among them, the entropy weight method is a comprehensive evaluation method that can be used for multiple objects and multiple indicators. The entropy weight method is used to comprehensively evaluate the benchmark performance test results of the candidate database and the performance test results in the business scenario to obtain the comprehensive performance index results.

[0100] S105: Determine the replacement capability indicator result of the candidate database based on the compatibility indicator result, the comprehensive performance indicator result, the preset transformation cost indicator result and the functional indicator result obtained through the functional test.

[0101] In some embodiments, the database replacement capability also needs to evaluate the transformation cost of replacing the current database with the candidate database, that is, the transformation cost indicator result. Among them, the transformation cost includes three items: program transformation, data migration and script debugging. Program transformation includes modifying the database driver, connection information and SQL statements dynamically generated by the program. Data migration is the migration of data from the current database to the candidate database. Script debugging refers to script debugging performed to complete the migration of objects such as functions, stored procedures, and triggers. For the candidate database, the system architect and database administrator of the business system evaluate the database transformation cost in units of man / day. The transformation cost is equal to the sum of the three costs of program transformation cost, data migration cost and script debugging cost.

[0102] Table 4 Example of transformation cost assessment

[0103]

[0104] In some embodiments of the present invention, the database replacement capability also needs to evaluate the functionality of the candidate database, and the functionality of the database can be obtained through functional testing. Among them, the functional test of the database can be tested by the database administrator according to the configured database function evaluation model. As shown in Tables 5 and 6, the database function evaluation model includes 13 test items and 30 test points in four capability domains, including high availability, backup and recovery capability, operation and maintenance capability, and security protection. During the test, it is verified according to each test point whether the candidate database has the corresponding capability. If it has the corresponding capability, the functional score is 1, and if it does not, the functional score is 0. The weight of each test point is determined by the expert survey method. According to the functional score and corresponding weight of each test point, the functional index result of the candidate database is obtained by weighted summation.

[0105] Table 5 Database function test point example table

[0106]

[0107]

[0108]

[0109] Table 6 Database function score example table

[0110]

[0111]

[0112]

[0113] In some embodiments, the method of comprehensively determining the replacement capability indicator result of the candidate database by combining various indicators includes:

[0114] A multi-attribute decision-making method based on comprehensive weights is used to calculate the compatibility index results, comprehensive performance index results, transformation cost index results and functional index results to obtain the alternative capacity index results; among them, the comprehensive weight is calculated by the linear weighted average method based on the subjective weight and the objective weight, the subjective weight is calculated based on the hierarchical analysis method and the expert survey method, and the objective weight is calculated based on the entropy weight method.

[0115] like Figure 3 As shown, in this embodiment, a multi-attribute decision-making method (Technique for Order Preference by Similarity to an Ideal Solution, TOPSIS) is used to comprehensively consider the compatibility index results, comprehensive performance index results, transformation cost index results and functional index results to perform a comprehensive evaluation and obtain the alternative capability index results of the candidate database.

[0116] Among them, the subjective weights of the results of each indicator are calculated by using the analytic hierarchy process and the expert survey method. That is, the expert survey method is added on the basis of the analytic hierarchy process, and the subjective bias of the single analytic hierarchy process is corrected through the opinions of experts in the business field and core members of the project; the entropy weight method is used to calculate the objective weights of the results of each indicator, and the linear weighted average method is used to calculate the comprehensive weight of the subjective weight and the objective weight. Based on the comprehensive weight, the multi-attribute decision-making method is used to combine the results of each indicator to calculate the results of the alternative capability indicators of the candidate database. By combining subjective and objective methods to jointly determine the comprehensive weight, while respecting the opinions of experts, the objectivity of the data is guaranteed, and the polarization effect caused by different evaluation methods is reduced. The objectivity of the indicator weight can be guaranteed, so that the results of the alternative capability indicators can more accurately reflect the real needs of the business system.

[0117] The database replacement capability testing method provided in the embodiment of the present application comprehensively tests and evaluates the candidate database from the aspects of compatibility, performance, transformation cost, function verification, etc., and uses a multi-attribute decision-making method based on comprehensive weights to quantify and score the index results of various aspects to obtain the replacement capability index results of the candidate database. After obtaining the replacement capability index results of each candidate database according to the method of the present application, a database suitable for replacing the current database can be selected based on the replacement capability index results of each candidate database, providing a reference solution for database replacement.

[0118] In some methods, the weights of the results of various indicators in the candidate databases can be flexibly set according to the business scenario of the current database, so as to select an alternative database that is more suitable for the business scenario of the current database.

[0119] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.

[0120] It should be noted that the above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0121] like Figure 4 As shown, the embodiment of the present application also provides a database replacement capability testing device, comprising:

[0122] The compatibility test module is used to compare the data types, naming rules, grammatical rules, and functions of the candidate database with the data types, naming rules, grammatical rules, and functions of the current database to obtain compatibility index results;

[0123] A benchmark performance testing module, used to perform a benchmark performance test on the candidate database using a preset testing tool to obtain a benchmark performance indicator result;

[0124] The business performance testing module is used to use the preset automated testing tools to perform performance testing on the selected database under specific business scenarios to obtain business scenario performance indicator results;

[0125] A comprehensive performance calculation module is used to determine the comprehensive performance indicator results based on the benchmark performance indicator results and the business scenario performance indicator results;

[0126] The alternative capability test module is used to determine the alternative capability indicator results of the candidate database based on the compatibility indicator results, the comprehensive performance indicator results, the preset transformation cost indicator results and the functional indicator results obtained through functional testing.

[0127] In some embodiments, the compatibility testing module is used to compare the data type of the candidate database with the data type of the current database according to a preset level matching rule to determine the data type compatibility index value of the candidate database; determine the naming rule compatibility index value of the candidate database according to the naming rule of the candidate database and the naming rule of the current database according to the preset compatibility calculation rule; compare the grammatical rules of the candidate database with the grammatical rules of the current database according to the preset grammar compatibility rule to determine the grammar rule compatibility index value of the candidate database; compare the functions of the candidate database with the functions of the current database according to the preset function compatibility rule to determine the function compatibility index value of the candidate database; and determine the compatibility index result according to the data type compatibility index value and the corresponding weight, the naming rule compatibility index value and the corresponding weight, the grammar rule compatibility index value and the corresponding weight, and the function compatibility index value and the corresponding weight.

[0128] In some embodiments, the compatibility testing module is used to determine the compatibility score of each data type in the candidate database according to a preset level matching rule, including: for each data type in the candidate database, matching the data type with each data type in the current database in turn, and determining the compatibility score of the data type according to the matching degree and the level matching rule; and determining the data type compatibility index value based on the compatibility score of each data type.

[0129] In some embodiments, the compatibility testing module is used to calculate the naming rule compatibility index value based on the difference between the naming rule set of the selected database and the naming rule set of the current database, the difference between the naming rule set of the current database and the naming rule set of the selected database, and the number of elements in the two naming rule sets; wherein the naming rule set includes identifiers and reserved words; according to the preset grammar compatibility rules, the compatibility score of each grammar point in the selected database is determined, including: for each grammar point in the selected database, the grammar point is compared with the corresponding grammar point in the current database to obtain a comparison result of whether the grammar points are the same, and the compatibility score of the grammar point is determined according to the comparison result; based on the compatibility score of each grammar point, the grammar rule compatibility index value is determined; and according to the function compatibility rule, the compatibility score of each function in the selected database is determined, including: for each function in the selected database, searching from the current database whether there is a function with the same function as the function, and determining the compatibility score of the function according to the search result; based on the compatibility score of each function, the function compatibility index value is determined.

[0130] In some embodiments, the alternative capability testing module is used to calculate the compatibility index results, comprehensive performance index results, transformation cost index results and functional index results using a multi-attribute decision-making method based on comprehensive weights to obtain alternative capability index results; wherein the comprehensive weight is calculated using a linear weighted average method based on subjective weights and objective weights, the subjective weight is calculated based on a hierarchical analysis method and an expert survey method, and the objective weight is calculated based on an entropy weight method.

[0131] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0132] The apparatus of the above-mentioned embodiment is used to implement the corresponding method in the above-mentioned embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0133] Figure 5 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0134] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0135] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0136] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0137] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0138] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0139] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0140] The electronic device of the above embodiment is used to implement the corresponding method in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0141] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0142] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0143] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present disclosure, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0144] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0145] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present disclosure.

Claims

1. A database substitution capability testing method, characterized in that: include: Compare the data types, naming rules, grammatical rules, and functions of the candidate database with those of the current database to obtain compatibility index results; Using a preset test tool to perform a benchmark performance test on the candidate database to obtain a benchmark performance indicator result; Using a preset automated testing tool to perform performance testing on the candidate database in a specific business scenario to obtain business scenario performance indicator results; Determine the comprehensive performance indicator results based on the benchmark performance indicator results and business scenario performance indicator results; Based on the compatibility index result, the comprehensive performance index result, the preset transformation cost index result and the functional index result obtained through functional testing, the replacement capability index result of the candidate database is determined.

2. The method according to claim 1, characterized in that Compare the data types, naming rules, grammatical rules, and functions of the candidate database with those of the current database to obtain compatibility index results, including: According to a preset level matching rule, the data type of the candidate database is compared with the data type of the current database to determine the data type compatibility index value of the candidate database; According to the naming rule of the candidate database and the naming rule of the current database, a compatibility index value of the naming rule of the candidate database is determined according to a preset compatibility calculation rule; According to preset grammatical compatibility rules, the grammatical rules of the candidate database are compared with the grammatical rules of the current database to determine the grammatical rule compatibility index value of the candidate database; According to a preset function compatibility rule, the function of the candidate database is compared with the function of the current database to determine the function compatibility index value of the candidate database; The compatibility index result is determined based on the data type compatibility index value and the corresponding weight, the naming rule compatibility index value and the corresponding weight, the grammar rule compatibility index value and the corresponding weight, and the function compatibility index value and the corresponding weight.

3. The method according to claim 2, characterized in that The step of comparing the data type of the candidate database with the data type of the current database according to a preset level matching rule to determine the data type compatibility index value of the candidate database includes: According to a preset level matching rule, determining the compatibility score of each data type in the candidate database, including: for each data type in the candidate database, matching the data type with each data type in the current database in turn to obtain a matching degree, and determining the compatibility score of the data type according to the matching degree and the level matching rule; Based on the compatibility score of each data type, the data type compatibility index value is determined.

4. The method according to claim 2, characterized in that: According to the naming rule of the candidate database and the naming rule of the current database, and in accordance with a preset compatibility calculation rule, a compatibility index value of the naming rule of the candidate database is determined, including: Calculate the naming rule compatibility index value according to the difference between the naming rule set of the candidate database and the naming rule set of the current database, the difference between the naming rule set of the current database and the naming rule set of the candidate database, and the number of elements in the two naming rule sets; wherein the naming rule set includes identifiers and reserved words; The step of comparing the grammatical rules of the candidate database with the grammatical rules of the current database according to the preset grammatical compatibility rules to determine the grammatical rule compatibility index value of the candidate database includes: Determining the compatibility score of each grammatical point in the candidate database according to a preset grammatical compatibility rule, including: for each grammatical point in the candidate database, comparing the grammatical point with a corresponding grammatical point in the current database to obtain a comparison result of whether the grammatical points are the same, and determining the compatibility score of the grammatical point according to the comparison result; Determining the compatibility index value of the grammar rule based on the compatibility score of each grammar point; The comparing the function of the candidate database with the function of the current database according to the preset function compatibility rule to determine the function compatibility index value of the candidate database includes: Determining the compatibility score of each function in the candidate database according to the function compatibility rule, including: for each function in the candidate database, searching the current database for a function with the same function as the function, and determining the compatibility score of the function according to the search result; Based on the compatibility score of each function, the function compatibility index value is determined.

5. The method according to claim 1, characterized in that Based on the compatibility index result, the comprehensive performance index result, the preset transformation cost index result and the functional index result obtained through the functional test, the replacement capability index result of the candidate database is determined, including: A multi-attribute decision-making method based on comprehensive weights is used to calculate the compatibility index results, comprehensive performance index results, transformation cost index results and functional index results to obtain the alternative capacity index results; wherein the comprehensive weight is calculated using a linear weighted average method based on subjective weights and objective weights, the subjective weight is calculated based on a hierarchical analysis method and an expert survey method, and the objective weight is calculated based on an entropy weight method.

6. A database replacement capability testing device, characterized in that: include: The compatibility test module is used to compare the data types, naming rules, grammatical rules, and functions of the candidate database with the data types, naming rules, grammatical rules, and functions of the current database to obtain compatibility index results; A benchmark performance testing module, used to perform a benchmark performance test on the candidate database using a preset testing tool to obtain a benchmark performance indicator result; A business performance testing module is used to use a preset automated testing tool to perform a performance test on the candidate database under a specific business scenario to obtain a business scenario performance indicator result; A comprehensive performance calculation module is used to determine the comprehensive performance indicator results based on the benchmark performance indicator results and the business scenario performance indicator results; The alternative capability test module is used to determine the alternative capability indicator result of the candidate database based on the compatibility indicator result, the comprehensive performance indicator result, the preset transformation cost indicator result and the functional indicator result obtained through functional testing.

7. The device according to claim 6, characterized in that The compatibility testing module is used to compare the data type of the candidate database with the data type of the current database according to the preset level matching rule to determine the data type compatibility index value of the candidate database; determine the naming rule compatibility index value of the candidate database according to the naming rule of the candidate database and the naming rule of the current database according to the preset compatibility calculation rule; compare the grammatical rules of the candidate database with the grammatical rules of the current database according to the preset grammar compatibility rule to determine the grammar rule compatibility index value of the candidate database; compare the function of the candidate database with the function of the current database according to the preset function compatibility rule to determine the function compatibility index value of the candidate database; and determine the compatibility index result according to the data type compatibility index value and the corresponding weight, the naming rule compatibility index value and the corresponding weight, the grammar rule compatibility index value and the corresponding weight, and the function compatibility index value and the corresponding weight.

8. The device according to claim 7, characterized in that The compatibility testing module is used to determine the compatibility score of each data type in the candidate database according to a preset level matching rule, including: for each data type in the candidate database, the data type is matched with each data type in the current database in turn, and the compatibility score of the data type is determined according to the matching degree and the level matching rule; and based on the compatibility score of each data type, the compatibility index value of the data type is determined.

9. The device according to claim 7, characterized in that The compatibility testing module is used to calculate the naming rule compatibility index value according to the difference between the naming rule set of the candidate database and the naming rule set of the current database, the difference between the naming rule set of the current database and the naming rule set of the candidate database, and the number of elements in the two naming rule sets; wherein the naming rule set includes identifiers and reserved words; according to the preset grammar compatibility rules, the compatibility score of each grammar point in the candidate database is determined, including: for each grammar point in the candidate database, the grammar point is compared with the corresponding grammar point in the current database to obtain a comparison result of whether the grammar points are the same, and the compatibility score of the grammar point is determined according to the comparison result; based on the compatibility score of each grammar point, the grammar rule compatibility index value is determined; and according to the function compatibility rule, the compatibility score of each function in the candidate database is determined, including: for each function in the candidate database, whether there is a function with the same function as the function in the current database, and the compatibility score of the function is determined according to the search result; based on the compatibility score of each function, the function compatibility index value is determined.

10. The device according to claim 6, characterized in that The alternative capability test module is used to calculate the compatibility index results, comprehensive performance index results, transformation cost index results and functional index results using a multi-attribute decision-making method based on comprehensive weights to obtain the alternative capability index results; wherein the comprehensive weight is calculated using a linear weighted average method based on subjective weights and objective weights, the subjective weight is calculated based on a hierarchical analysis method and an expert survey method, and the objective weight is calculated based on an entropy weight method.

11. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute any one of claims 1 to 5.

Citation Information

Patent Citations

  • Domestic substitution migration method for foreign technology application system

    CN113127445A

  • Database replacement method, device and equipment and computer readable medium

    CN116450610A

  • Universal adaptation optimization method and system for credential software

    CN116594878A

  • SQL (Structured Query Language) automatic translation method and system oriented to domestic database migration

    CN117453657A

  • Database replication with continue and tape-type-override functions

    US20160246505A1