A distributed database non-functional testing method and system

Through a multi-level and multi-stage targeted testing method, the problem that traditional databases cannot scale out and support complex SQL and distributed transactions is solved, and the high reliability, high performance and high availability of distributed database clusters in distributed banking systems is realized. .

CN114218112BActive Publication Date: 2024-12-10CCB FINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111566952.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-20
Publication Date
2024-12-10
Estimated Expiration
2041-12-20

AI Technical Summary

Technical Problem

Traditional databases cannot scale horizontally and are difficult to support complex SQL and distributed transactions, making it difficult to guarantee the performance and reliability of distributed banking systems in special transaction scenarios.

Method used

Using a multi-level and multi-stage targeted testing method, by configuring access paths and trading scenario classification, setting background pressures and test disturbances, and performing non-functional testing, ensuring the high reliability, high performance and high performance of distributed database clusters in complex trading scenarios. Availability.

Benefits of technology

The database has achieved disaster recovery fault tolerance, data consistency and automated operation and maintenance capabilities. After a failure occurs, the service can be circuited or downgraded, and the corresponding services can be restored after the failure is restored, ensuring the high reliability, high performance and high availability of the distributed banking system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114218112B_ABST
    Figure CN114218112B_ABST
Patent Text Reader

Abstract

The present invention relates to a distributed database non-functional testing method and system, which sets corresponding test disturbance sets according to transaction scenario classification and uses path labels to match distributed database access path classification. Aiming at the characteristics of distributed databases, a multi-level and multi-stage targeted testing method is used to ensure that domestic database clusters can provide highly reliable, high-performance and highly available services for distributed banking core systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of database testing and data processing, and in particular to a distributed database non-functional testing method and system. Background Art

[0002] Traditional databases have high requirements for hardware infrastructure and can only be expanded vertically, not horizontally, and are prone to reaching performance limits; although sharding can be expanded horizontally, it does not support complex SQL and is difficult to guarantee ACID for distributed transactions. Distributed databases can effectively solve these problems and have the characteristics of low hardware cost, high scalability, and high availability.

[0003] Based on these characteristics, distributed databases provide load balancing, data reliability and high availability, and distributed transactions for distributed banking systems. The characteristics of special transaction scenarios of distributed banking core systems include: (1) complex transactions with many database accesses; (2) transactions with complex SQL statements; (3) complex transactions involving multiple accounts; (4) complex transactions involving multiple data shards; and (5) transactions involving hot data.

[0004] Therefore, it is of great significance to fully test the distributed database and ensure that the distributed database cluster can provide high-reliability, high-performance, and high-availability services for the distributed banking core system. Summary of the invention

[0005] In order to address the deficiencies of the prior art, the present invention proposes a distributed database non-functional testing method and system. Aiming at the characteristics of distributed databases, a multi-level and multi-stage targeted testing method is used to ensure that domestic database clusters can provide highly reliable, high-performance, and highly available services for distributed banking core systems.

[0006] To achieve the above objectives, the technical solutions adopted by the present invention include:

[0007] A distributed database non-functional testing method, characterized by comprising:

[0008] S1. Configure the access path classification of the distributed database;

[0009] S2. Configuring transaction scenarios for distributed databases;

[0010] S3. Set background pressure for non-functional testing;

[0011] S4. Setting a corresponding test perturbation set according to the transaction scenario classification, wherein the test perturbation set includes one or more test perturbations, and the test perturbation includes a path label corresponding to the access path classification;

[0012] S5. Select the project to be tested and match the transaction scenario classification to which the project to be tested belongs;

[0013] S6. Load the background pressure and select the corresponding test disturbance set according to the transaction scenario classification of the project to be tested;

[0014] S7, setting an access path for testing, and selecting a matching test disturbance from a test disturbance set according to the path label;

[0015] S8. Perform non-functional testing using test disturbances;

[0016] S9. Repeat steps S5 to S8 to perform non-functional tests on all items to be tested.

[0017] Furthermore, the access path classification includes non-distributed core direct access, distributed core direct access, non-distributed core access to distributed core, distributed core access to non-distributed core and distributed core cross-regional center access.

[0018] Furthermore, the transaction scenario classification includes general query category, complex query category, online payment consumption category, online payment withdrawal category, consumption category, withdrawal category, transfer category and maintenance category.

[0019] Furthermore, the step S3 comprises:

[0020] Obtain the proportion and average response time of each transaction in the distributed core under normal business day business scenarios to form the background pressure for non-functional testing.

[0021] Further, selecting a matching test disturbance from a test disturbance set according to the path label includes:

[0022] Select a matching test perturbation from the test perturbation set;

[0023] Or, select multiple matching test perturbations from the test perturbation set.

[0024] Furthermore, the step S8 comprises the following sub-steps:

[0025] S81. Stable operation of the test items under background pressure;

[0026] S82, introduce a test disturbance and record a work log under the test disturbance;

[0027] S83. Eliminate the test disturbance and determine whether the item to be tested has returned to stable operation.

[0028] Furthermore, the sub-step S82 further includes:

[0029] When there are multiple test disturbances, each test disturbance is introduced one by one, or all test disturbances are introduced synchronously.

[0030] The present invention also relates to a distributed database non-functional testing system, characterized in that it comprises:

[0031] Access path configuration module, used to configure the access path classification of the distributed database;

[0032] The transaction scenario configuration module is used to configure the transaction scenario classification of the distributed database;

[0033] Background pressure generation module, used to set background pressure for non-functional testing;

[0034] The test perturbation configuration module is used to set the corresponding test perturbation set according to the transaction scenario classification;

[0035] The first matching module is used to match the transaction scenario classification to which the project to be tested belongs;

[0036] A second matching module is used to select a corresponding test perturbation set according to the transaction scenario classification to which the project to be tested belongs, and select a matching test perturbation from the test perturbation set according to the path label;

[0037] An execution module for executing non-functional tests using test perturbations.

[0038] The present invention also relates to a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and the computer program implements the above method when executed by a processor.

[0039] The present invention also relates to an electronic device, characterized in that it comprises a processor and a memory;

[0040] The memory is used to store access path classification, transaction scenario classification and test disturbance set;

[0041] The processor is used to execute the above method by calling access path classification, transaction scenario classification and test disturbance set.

[0042] The present invention also relates to a computer program product, comprising a computer program and / or instructions, characterized in that the computer program and / or instructions implement the steps of the above method when executed by a processor.

[0043] The beneficial effects of the present invention are:

[0044] By adopting the distributed database non-functional testing method and system described in the present invention, based on the characteristics of the distributed database, through multi-level and multi-stage targeted testing methods, including the disaster recovery and fault tolerance capability of the database, the consistency capability of the database, the horizontal expansion capability of the database and the automatic operation and maintenance capability of the database, the service can be fused or downgraded after a failure occurs, and the corresponding service can be restored after the failure is recovered, ensuring that the domestic database cluster can provide highly reliable, high-performance and highly available services for the distributed banking core system. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 The figure is a flow chart of the distributed database non-functional testing method of the present invention.

[0046] Figure 2 It is a schematic diagram of the structure of the distributed database non-functional testing system of the present invention. DETAILED DESCRIPTION

[0047] In order to more clearly understand the content of the present invention, it will be described in detail with reference to the drawings and embodiments.

[0048] The first aspect of the present invention relates to a process of steps as follows Figure 1 The distributed database non-functional testing method shown includes:

[0049] S1. Configure the access path classification of the distributed database.

[0050] Among them, the access path classification includes non-distributed core direct access, distributed core direct access, non-distributed core access to distributed core, distributed core access to non-distributed core and distributed core cross-regional center access.

[0051] For example, customer account A data is distributed in a central database in Beijing. A customer initiates a non-moved transaction involving account A in Wuhan, which corresponds to the non-distributed core direct access classification; customer account A data is located in a center in Beijing. A customer initiates a moved transaction involving account A in Wuhan, and the process involves calling a non-moved core transaction, which corresponds to the distributed core access non-distributed core classification; customer account A data is located in the current core, and account B data is located in the distributed core of a center in Wuhan. A customer initiates a transfer transaction from account A to account B in Beijing, which corresponds to the non-distributed core access distributed core classification; customer account A data is distributed in a central database in Beijing. A customer initiates a distributed moved transaction of account A in Beijing, which corresponds to the distributed core direct access classification; customer account A data is distributed in a center in Wuhan, and account B data is distributed in a center in Beijing. A customer initiates a transfer transaction from account A to account B in Beijing (all transactions involved have been moved downward), which corresponds to the distributed core cross-regional center access classification.

[0052] S2. Configure the transaction scenario classification of the distributed database.

[0053] Among them, the transaction scenario classification includes general query category, complex query category, online consumption category, online withdrawal category, consumption category, withdrawal category, transfer category and maintenance category.

[0054] Of course, the transaction scenario classification can be adaptively adjusted according to the actual usage and application environment of the distributed database. The main function of the transaction scenario classification is to distinguish the test disturbances used for testing so that correct and effective test disturbances can be selected and executed during the test process.

[0055] S3. Setting background pressure for non-functional testing. Specifically, the proportion and average response time of each transaction in the distributed core under the business scenario of a general business day can be obtained to form the background pressure for non-functional testing.

[0056] S4. Setting a corresponding test perturbation set according to the transaction scenario classification, wherein the test perturbation set includes one or more test perturbations, and the test perturbation includes a path label corresponding to the access path classification.

[0057] Test disturbances may include abnormal situations that have a significant impact on the distributed database, such as downtime (primary node, secondary node), process stop, process hang, network card disablement, etc., or any other items that need to be tested, such as multiple user login errors, external network attacks, etc.

[0058] Corresponding to the transaction scenario classification, different test perturbations can be combined to form a test perturbation set, which is the important perturbations that can have an impact (or are believed to have an impact) corresponding to the specific transaction scenario classification. For other perturbations with less obvious impact, excluding them from the set can reduce the running calculation pressure during the test without affecting the test results.

[0059] On the other hand, by adding path labels to the test perturbations, the test perturbations in the set have the corresponding attributes of the access path and the transaction scenario, which can achieve more targeted non-functional testing.

[0060] S5. Select the project to be tested and match the transaction scenario category to which the project to be tested belongs.

[0061] Preferably, the main items to be tested for the distributed database include computing node cluster effectiveness, data node master-slave replica failure effectiveness, global traffic management node master-slave switching effectiveness, management node cluster effectiveness and disaster recovery switching effectiveness.

[0062] S6. Load the background pressure and select the corresponding test disturbance set according to the transaction scenario classification of the project to be tested.

[0063] For different test items, corresponding access paths and transaction scenarios are selected, and then the available test disturbances are matched. Preferably, when there are multiple test disturbances, they can be tested separately in sequence, or multiple test disturbances can be applied simultaneously for comprehensive testing.

[0064] S7. Set an access path for testing, and select a matching test perturbation from a test perturbation set according to the path label.

[0065] Preferably, the test disturbance obtained by matching may be one or multiple different test disturbances, and as long as they meet the matching relationship of the path label, they should be selected as the matching test disturbance.

[0066] S8. Perform non-functional testing using test disturbances, including:

[0067] S81. Stable operation of the test items under background pressure;

[0068] S82, introduce a test disturbance, record the work log under the test disturbance, and when there are multiple test disturbances, you can choose to introduce each test disturbance one by one, or introduce all test disturbances synchronously;

[0069] S83. Eliminate the test disturbance and determine whether the item to be tested has returned to stable operation.

[0070] For example, for the compute node cluster effectiveness project, select the downtime test disturbance and perform the following steps:

[0071] 1) Initiate scenario stress, use the stress tool, and perform stress according to the capacity ratio of the business scenario on a normal business day. After the TPS is stable, run for 5 minutes, and the online business is processed normally;

[0072] 2) The node is down. Execute the command: date; reboot. Observe the transaction error rate, processing capacity, response time and host resource status in the scenario. After the TPS is restored, the scenario will continue to run for 5 minutes.

[0073] 3) Start the computing node process date; . / dbstart;

[0074] 4) All faulty machines have been restored and online business is being processed normally.

[0075] S9. Repeat steps S5 to S8 to perform non-functional tests on all items to be tested.

[0076] Another aspect of the present invention also relates to a distributed database non-functional testing system, the structure of which is as follows: Figure 2 As shown, including:

[0077] Access path configuration module, used to configure the access path classification of the distributed database;

[0078] The transaction scenario configuration module is used to configure the transaction scenario classification of the distributed database;

[0079] Background pressure generation module, used to set background pressure for non-functional testing;

[0080] The test perturbation configuration module is used to set the corresponding test perturbation set according to the transaction scenario classification;

[0081] The first matching module is used to match the transaction scenario classification to which the project to be tested belongs;

[0082] A second matching module is used to select a corresponding test perturbation set according to the transaction scenario classification to which the project to be tested belongs, and select a matching test perturbation from the test perturbation set according to the path label;

[0083] An execution module for executing non-functional tests using test perturbations.

[0084] By using this system, the above-mentioned operation processing method can be executed and the corresponding technical effects can be achieved.

[0085] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the method in the above embodiment, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps in the method in the above embodiment are implemented.

[0086] An embodiment of the present invention also provides an electronic device for executing the above method. As an implementation device of the method, the electronic device at least has a processor and a memory, and in particular, the memory stores data and related computer programs required for executing the method, such as access path classification, transaction scenario classification, and test disturbance set, etc., and the processor calls the data and program in the memory to execute all steps of the implementation method and obtains the corresponding technical effect.

[0087] Preferably, the electronic device may include a bus architecture, the bus may include any number of interconnected buses and bridges, and the bus will include various circuits linked together by one or more processors and memories. The bus may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same component, i.e., a transceiver, providing a unit for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used to store data used by the processor when performing operations.

[0088] In addition, the electronic device may further include components such as a communication module, an input unit, an audio processor, a display, and a power supply. The processor (or controller, operation control) used may include a microprocessor or other processor device and / or a logic device, which receives input and controls the operation of various components of the electronic device; the memory may be one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable devices, which may store the above-mentioned related data information, and may also store a program for executing related information, and the processor may execute the program stored in the memory to realize information storage or processing, etc.; the input unit is used to provide input to the processor, for example, it may be a key or a touch input device; the power supply is used to provide power to the electronic device; the display is used to display display objects such as images and text, for example, it may be an LCD display. The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal. Based on different communication technologies, multiple communication modules may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) is also coupled to a speaker and a microphone via an audio processor to provide an audio output via the speaker and receive an audio input from the microphone, thereby realizing a common telecommunication function. The audio processor may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor is also coupled to a central processor, so that recording can be performed on the machine through the microphone, and the sound stored on the machine can be played through the speaker.

[0089] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0090] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or boxes.

[0091] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0092] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0093] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A distributed database non-functional testing method, It is characterized in that include: S1. Configure the access path classification of the distributed database; S2. Configuring transaction scenarios for distributed databases; S3. Set background pressure for non-functional testing; S4. Setting a corresponding test perturbation set according to the transaction scenario classification, wherein the test perturbation set includes one or more test perturbations, and the test perturbation includes a path label corresponding to the access path classification; S5. Select the project to be tested and match the transaction scenario classification to which the project to be tested belongs; S6. Load the background pressure and select the corresponding test disturbance set according to the transaction scenario classification of the project to be tested; S7, setting an access path for testing, and selecting a matching test disturbance from a test disturbance set according to the path label; S8. Perform non-functional testing using test disturbances; S9, repeating steps S5 to S8 to perform non-functional tests on all items to be tested; The step S8 comprises the following sub-steps: S81. Stable operation of the test items under background pressure; S82, introduce a test disturbance and record a work log under the test disturbance; S83. Eliminate the test disturbance and determine whether the item to be tested has returned to stable operation.

2. The method according to claim 1, It is characterized in that The access path classification includes non-distributed core direct access, distributed core direct access, non-distributed core access to distributed core, distributed core access to non-distributed core and distributed core cross-regional center access.

3. The method according to claim 1, It is characterized in that The transaction scenario classification includes general query category, complex query category, online consumption category, online withdrawal category, consumption category, withdrawal category, transfer category and maintenance category.

4. The method according to claim 1, It is characterized in that The step S3 comprises: Obtain the proportion and average response time of each transaction in the distributed core under normal business day business scenarios to form the background pressure for non-functional testing.

5. The method according to claim 1, It is characterized in that The selecting a matching test disturbance from the test disturbance set according to the path label includes: Select a matching test perturbation from the test perturbation set; Or, select multiple matching test perturbations from the test perturbation set.

6. The method according to claim 5, It is characterized in that The sub-step S82 further includes: When there are multiple test disturbances, each test disturbance is introduced one by one, or all test disturbances are introduced synchronously.

7. A distributed database non-functional testing system, It is characterized in that include: Access path configuration module, used to configure the access path classification of the distributed database; The transaction scenario configuration module is used to configure the transaction scenario classification of the distributed database; Background pressure generation module, used to set background pressure for non-functional testing; The test perturbation configuration module is used to set the corresponding test perturbation set according to the transaction scenario classification; The first matching module is used to match the transaction scenario classification to which the project to be tested belongs; A second matching module is used to select a corresponding test perturbation set according to the transaction scenario classification to which the project to be tested belongs, and select a matching test perturbation from the test perturbation set according to the path label; an execution module for executing non-functional tests using test perturbations; The execution module is further configured to: Run the project to be tested stably under background pressure; introduce test disturbances and record work logs under test disturbances; eliminate test disturbances and determine whether the project to be tested has returned to stable operation.

8. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. An electronic device, It is characterized in that including a processor and a memory; The memory is used to store access path classification, transaction scenario classification and test disturbance set; The processor is used to execute the method according to any one of claims 1 to 6 by calling access path classification, transaction scenario classification and test disturbance set.

10. A computer program product comprising a computer program and / or instructions, It is characterized in that When the computer program and / or the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.