Transaction test method, device, equipment, medium and program product

By using machine learning models to detect and automatically correct anomalies in transaction testing, the problems of low testing efficiency and inaccurate results in complex transaction links are solved, and efficient and accurate transaction testing is achieved.

CN120653576APending Publication Date: 2025-09-16INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511110421.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Complex online transaction links make end-to-end full-process testing difficult, incorrect parameter settings lead to low transaction testing efficiency and distorted results, and the automated testing process is too inefficient.

Method used

Through machine learning models, the transaction test status is detected, an exception handling strategy is generated, and parameter errors are automatically corrected to ensure the continuity of the transaction test process.

Benefits of technology

It improves the efficiency of automated transaction testing, ensures the accuracy and completeness of test results, and avoids distortion of test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653576A_ABST
    Figure CN120653576A_ABST
Patent Text Reader

Abstract

The invention provides a transaction test method which can be applied to the technical field of financial science and technology. The transaction test method comprises the following steps: executing a transaction test based on test case parameters; detecting whether the transaction test is in an abnormal state; when the transaction test is in the abnormal state, generating a first exception handling strategy based on a preset machine learning model; and executing the first exception handling policy. The invention further provides a transaction testing device, transaction testing equipment, a storage medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of financial technology, and specifically to a transaction testing method, device, equipment, medium and program product. Background Art

[0002] As online transaction chains become increasingly complex, a simple transaction may involve more than 10 applications and the configuration of multiple variables across multiple applications. Such complex links and parameter configurations pose significant challenges to end-to-end testing. During testing, it's difficult to ensure the correctness of the transaction chain and verify the correct parameter settings for the associated applications within the chain. Incorrect parameter settings in test cases can lead to slow execution of end-to-end online transaction tests, distorted results, and numerous errors and omissions, further reducing the efficiency of automated testing. Summary of the Invention

[0003] In view of the above problems, the present disclosure provides a transaction testing method, apparatus, device, medium and program product that improve the efficiency of automated testing and the stability of test results.

[0004] According to a first aspect of the present disclosure, a transaction testing method is provided, including: performing a transaction test based on test case parameters; detecting whether the transaction test is in an abnormal state; when the transaction test is in an abnormal state, generating a first exception handling strategy based on a preset machine learning model; and executing the first exception handling strategy.

[0005] According to an embodiment of the present disclosure, after executing the first exception handling strategy, the method further includes: generating a second exception handling strategy based on a preset machine learning model if the first exception handling strategy fails to repair the abnormal state; and executing the second exception handling strategy.

[0006] According to an embodiment of the present disclosure, after executing the first exception handling strategy, the method further includes: if the first exception handling strategy fails to repair the abnormal state, recording the test case, the abnormal state, and the first exception handling strategy.

[0007] According to an embodiment of the present disclosure, after detecting whether the transaction test is in an abnormal state, before generating an exception handling strategy based on a preset machine learning model, it also includes: matching a third exception handling strategy in a case library based on the test case query; and executing the third exception handling strategy to ensure that the transaction test is executed normally.

[0008] According to an embodiment of the present disclosure, the preset machine learning model includes a decision tree model, and the method for establishing the preset machine learning model includes: obtaining first training data, the first training data including: first transaction information, first transaction attribute, first exception information, first exception attribute and a first preset exception handling strategy; establishing a parent node based on the first transaction attribute of the first transaction attribute; establishing a child node based on the first exception attribute and the first transaction information; and establishing a leaf node based on the first preset exception handling strategy.

[0009] According to an embodiment of the present disclosure, after executing the first exception handling strategy, the method further includes: maintaining the preset machine learning model, wherein maintaining the preset machine learning model includes: obtaining second training data, wherein the second training data includes: second transaction information, second transaction attributes, second exception information, second exception attributes, and a second preset exception handling strategy; matching the parent node in the decision tree model based on the second transaction attributes; establishing a child node based on the second exception attributes and the second transaction information; and establishing a leaf node based on the second preset exception handling strategy.

[0010] A second aspect of the present disclosure provides a transaction testing device, comprising: a testing module for performing transaction testing based on test case parameters; an anomaly detection module for detecting whether the transaction test is in an abnormal state; a strategy generation module for generating a first exception handling strategy based on a preset machine learning model when the transaction test is in an abnormal state; and an exception handling module for executing the first exception handling strategy.

[0011] According to an embodiment of the present disclosure, the strategy generation module is further used to generate a second exception handling strategy based on a preset machine learning model when the first exception handling strategy fails to repair the abnormal state; and execute the second exception handling strategy.

[0012] According to an embodiment of the present disclosure, after executing the first exception handling strategy, the method further includes: if the first exception handling strategy fails to repair the abnormal state, recording the test case, the abnormal state, and the first exception handling strategy.

[0013] According to an embodiment of the present disclosure, the strategy generation module is further used to query the case library based on the test case to match the third exception handling strategy; and the exception handling module is used to execute the third exception handling strategy to ensure the normal execution of the transaction test.

[0014] According to an embodiment of the present disclosure, the preset machine learning model includes a decision tree model, and the device also includes a model training module: used to obtain first training data, the first training data including: first transaction information, first transaction attribute, first exception information, first exception attribute and first preset exception handling strategy; establish a parent node based on the first transaction attribute of the first transaction attribute; establish a child node based on the first exception attribute and the first transaction information; and establish a leaf node based on the first preset exception handling strategy.

[0015] According to an embodiment of the present disclosure, the model training module is also used to obtain second training data, wherein the second training data includes: second transaction information, second transaction attributes, second exception information, second exception attributes and a second preset exception handling strategy; matching the parent node in the decision tree model based on the second transaction attributes; establishing a child node based on the second exception attributes and the second transaction information; and establishing a leaf node based on the second preset exception handling strategy.

[0016] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0017] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.

[0018] The fifth aspect of the present disclosure further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor.

[0019] In order to solve the technical problem of low efficiency of automated transaction testing, in the embodiments of the present disclosure, by periodically detecting whether the transaction test status is abnormal, and in the event of an abnormal state, generating and executing an exception handling strategy through a machine learning model, the automated transaction test interruption caused by incorrect test case parameters is corrected to ensure the continuity of the transaction test process and thus improve efficiency. In addition, the test case parameters obtained during the test process can be guaranteed to be complete and correct, avoiding distortion of test results due to configuration problems, and effectively ensuring the accuracy of test results. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0021] Figure 1The following schematically illustrates an application scenario of the transaction testing method according to an embodiment of the present disclosure;

[0022] Figure 2 The flowchart of the transaction testing method according to the embodiment of the present disclosure is schematically shown;

[0023] Figure 3 The full flow chart of the transaction testing method according to the embodiment of the present disclosure is schematically shown;

[0024] Figure 4 Schematically shows a decision tree structure diagram according to an embodiment of the present disclosure;

[0025] Figure 5 The following schematically illustrates a full flow chart of a method for training and maintaining a decision tree model according to an embodiment of the present disclosure;

[0026] Figure 6 Schematically shows a structural block diagram of a transaction testing device according to an embodiment of the present disclosure; and

[0027] Figure 7 The block diagram of an electronic device suitable for implementing the transaction testing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0028] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0029] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0030] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0031] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0032] An embodiment of the present disclosure provides a transaction testing method, which includes: executing a transaction test based on test case parameters; detecting whether the transaction test is in an abnormal state; when the transaction test is in an abnormal state, generating a first exception handling strategy based on a preset machine learning model; and executing the first exception handling strategy.

[0033] In order to solve the technical problem of low efficiency of automated transaction testing, in the embodiments of the present disclosure, by periodically detecting whether the transaction test status is abnormal, and in the event of an abnormal state, generating and executing an exception handling strategy through a machine learning model, the automated transaction test interruption caused by incorrect test case parameters is corrected to ensure the continuity of the transaction test process and thus improve efficiency. In addition, the test case parameters obtained during the test process can be guaranteed to be complete and correct, avoiding distortion of test results due to configuration problems, and effectively ensuring the accuracy of test results.

[0034] Figure 1 The application scenario diagram of the transaction testing method according to an embodiment of the present disclosure is schematically shown.

[0035] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or optical fiber cables.

[0036] A user may use a first terminal device 101, a second terminal device 102, or a third terminal device 103 to interact with a server 105 via a network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, or the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).

[0037] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0038] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process received data such as user requests, and feed back processing results (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal devices.

[0039] It should be noted that the transaction testing method provided in the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the transaction testing apparatus provided in the embodiments of the present disclosure can generally be located in the server 105. The transaction testing method provided in the embodiments of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and that is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Accordingly, the transaction testing apparatus provided in the embodiments of the present disclosure can also be located in a server or server cluster that is different from the server 105 and that is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105.

[0040] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0041] The following will be based on Figure 1 The scene described by Figures 2 to 5 The transaction testing method of the disclosed embodiment is described in detail.

[0042] Figure 2 The flowchart of the transaction testing method according to the embodiment of the present disclosure is schematically shown.

[0043] like Figure 2 As shown, the transaction testing method of this embodiment includes operations S210 to S240, and the transaction testing method can be executed by the server 105.

[0044] In operation S210 , a transaction test is performed based on the test case parameters.

[0045] Among them, the test case data provided by the tester is used to establish a related big database. During the automated testing process, the test case parameters in the big database are extracted to perform transaction testing.

[0046] Specifically, test case parameters include at least the following: Test case basic attributes: basic attributes of the test case, including but not limited to the tested function, business logic, input parameters, output parameters, program name, transaction name, etc. Test data: test data required for the test case, including but not limited to test file data, test table data, correct data set, and incorrect data set.

[0047] The transaction test is executed through the test case parameters and the test results are finally output. The results of the test case correspond to the previous test data in detail, including but not limited to the data situation after the test is successful, the test success rate, and the abnormal information situation under the failed data.

[0048] In operation S220 , it is detected whether the transaction test is in an abnormal state.

[0049] Specifically, the transaction test is periodically checked to see if an abnormal state occurs. The abnormal state at least includes returning empty or reporting an error.

[0050] In operation S230, when the transaction test is in an abnormal state, a first abnormality handling strategy is generated based on a preset machine learning model.

[0051] Specifically, if an abnormality occurs during a transaction test, information related to the transaction is used as input to a preset machine learning model to output a first abnormality handling strategy. For example, the error message and the transaction information are used as input to a preset machine learning model to output the first abnormality handling strategy. The preset machine learning model can be a supervised learning model that has been trained in advance by relevant personnel.

[0052] In operation S240 , the first exception handling strategy is executed.

[0053] Among them, the exception handling strategy is related to the business and is defined by relevant personnel. For example, when the error is a "card status" exception, the corresponding exception handling strategy is "adjust card status".

[0054] According to an embodiment of the present disclosure, after operation S240, the method further includes: generating a second exception handling strategy based on a preset machine learning model when the first exception handling strategy fails to repair the abnormal state; and executing the second exception handling strategy.

[0055] If the first exception handling strategy fails to fix the abnormal state, the machine learning model will try to output a second exception handling strategy that is different from the first one to fix the abnormal state. Of course, you can set a threshold for the number of repeated attempts. If multiple attempts to fix the error fail, the test case parameters of this time will be skipped and the next round of testing will begin.

[0056] According to an embodiment of the present disclosure, after operation S240, the method further includes: if the first exception handling strategy fails to fix the abnormal state, recording the test case, the abnormal state, and the first exception handling strategy.

[0057] Of course, if the first exception handling strategy fails to fix the abnormal state, the corresponding parameters can be recorded so that the relevant case library of the exception strategy can be manually maintained in preparation for the subsequent improvement of the solution.

[0058] According to an embodiment of the present disclosure, after operation S220 and before operation S240 , the process further includes: querying a case library for a matching third exception handling strategy based on the test case; and executing the third exception handling strategy to ensure normal execution of the transaction test.

[0059] Similarly, by matching transaction information and abnormal conditions in the case library, a third exception handling strategy is obtained. Before outputting data through the machine learning model, the case library can be used to query whether there is an existing exception handling strategy. This method of directly obtaining the exception handling strategy can reduce computing power costs.

[0060] In order to solve the technical problem of low efficiency of automated transaction testing, in the embodiments of the present disclosure, by periodically detecting whether the transaction test status is abnormal, and in the event of an abnormal state, generating and executing an exception handling strategy through a machine learning model, the automated transaction test interruption caused by incorrect test case parameters is corrected to ensure the continuity of the transaction test process and thus improve efficiency. In addition, the test case parameters obtained during the test process can be guaranteed to be complete and correct, avoiding distortion of test results due to configuration problems, and effectively ensuring the accuracy of test results.

[0061] Figure 3 The full flow chart of the transaction testing method according to an embodiment of the present disclosure is schematically shown.

[0062] like Figure 3 As shown, the transaction testing method at least includes operations S301 to S310.

[0063] In operation S301, scheduled transaction execution is initiated: the maintenance personnel sets the scheduled transaction execution time in the automated system through the input device. When the scheduled time point arrives, the automated system automatically initiates the transaction execution.

[0064] In operation S302 , periodically scanning the transaction execution status: the automated system periodically and automatically scans the transaction execution details at fixed intervals.

[0065] In operation S303, it is determined whether the transaction is in an abnormal state: for the acquired transaction information, it is determined whether it is in an abnormal state.

[0066] In operation S304, the transaction database is queried: For transactions in abnormal states, such as errors or no return information, the transaction database is checked to see whether the transaction information exists. If so, the process proceeds to operation S305. If not, the process proceeds to operation S306.

[0067] In operation S305, determine whether the transaction has an exception handling policy: query the transaction database to see if there is an exception handling policy for this transaction. If yes, proceed to step S07. If not, proceed to operation S306.

[0068] In operation S306 , an exception handling strategy is generated: transaction-related execution information is used and input into a data analysis and processing model to generate an exception handling strategy.

[0069] In operation S307, the transaction is automatically processed: Exception transactions are automatically processed according to the exception handling strategy generated in operation S305 or operation S306. If the processing is successful, the process proceeds to operation S308. If the processing fails, the process returns to operation S306 and generates a new exception handling strategy. If the processing fails three times, the fallback strategy is directly used and the process is skipped.

[0070] In operation S308, record the abnormal transaction processing list: after the abnormal transaction is automatically processed, the relevant information is saved in the local database.

[0071] In operation S309, the transaction ends: after all transactions are executed, the entire transaction ends.

[0072] In operation S310, the transaction database and data analysis and processing model are updated: after the transaction is completed, the confirmed transaction exception processing strategy is updated to the database and input into the data analysis and processing model to optimize the strategy model.

[0073] The following will disclose in detail the training method of the machine learning model in the embodiment of the present disclosure, wherein the preset machine learning model includes a decision tree model, as shown below:

[0074] Figure 4 The figure schematically shows a decision tree structure diagram according to an embodiment of the present disclosure.

[0075] like Figure 4 As shown in the figure, "node" is the same as "node". The structure of a decision tree includes at least internal nodes and leaf nodes. Different internal nodes have relative parent-child relationships, that is, parent nodes and child nodes, which are distinguished by directed edges. Parent nodes or child nodes can also have leaf nodes attached to them.

[0076] The decision tree model includes two steps: establishing a decision tree for existing abnormal transactions and establishing a decision tree for incremental abnormal transactions. In the disclosed embodiments, a decision tree algorithm is used to analyze and process abnormal transaction data, generate an abnormality handling decision tree, and output an abnormality handling decision solution for subsequent automated testing.

[0077] Figure 5 The full flow chart of the training and maintenance method of the decision tree model according to the embodiment of the present disclosure is schematically shown.

[0078] According to an embodiment of the present disclosure, the method for establishing the preset machine learning model includes: obtaining first training data, the first training data including: first transaction information, first transaction attribute, first exception information, first exception attribute and a first preset exception handling strategy; establishing a parent node based on the first transaction attribute of the first transaction attribute; establishing a child node based on the first exception attribute and the first transaction information; and establishing a leaf node based on the first preset exception handling strategy.

[0079] Specifically, the first training data comes from a large transaction database, which includes basic transaction attributes, transaction execution attributes, associated application attributes, and transaction exception handling strategies. The data source of the large database is imported by system maintenance personnel and inserted into the data processing and analysis system.

[0080] Transaction Basic Attributes: Basic transaction attribute information, including but not limited to the transaction name, transaction description, application name, distributed data layer, transaction maintenance personnel, etc. This information is used to identify basic transaction information, such as the transaction's purpose, and serves as basic data in a large database. Transaction Execution Attributes: Transaction execution information, including but not limited to the transaction's code base, required transaction parameters, required transaction data, and the names of upstream and downstream applications involved in the transaction. This information is used to identify how the transaction is executed and its interactions with other applications. Associated Application Attributes: Information about the upstream and downstream applications involved in the transaction, such as application name, service name, switch parameters, etc. Transaction Exception Handling Strategy: Strategies for handling exceptions in transaction execution, such as modifying parameters, modifying database records, or contacting contacts in upstream and downstream applications.

[0081] In a typical embodiment, the combination Figure 5 As shown in the figure, the process of establishing a decision tree for abnormal stock transactions is as follows:

[0082] Step 1: Use the data in the transaction database to create a data set;

[0083] Step 2: Read the data set and create a training set: Transaction exception handling;

[0084] Next, the training set sequentially reads transactions from the dataset, analyzes the transaction attribute categories, calculates the information gain rate for each attribute, selects the attribute with the highest information gain rate, and creates a parent node with the same name, annotating its eigenvalue. If a node with the same attribute name and eigenvalue already exists, it does not need to be created again.

[0085] For example, for deposit transactions, its attributes include: counter transactions, account-related transactions, credit card transactions, cash transactions, balance increases, and transactions involving upstream and downstream transactions. The attribute with the highest information gain rate is "credit card transaction", and the characteristic value is "CREDIT CARD". A parent node named "Credit Card Transaction" is created.

[0086] Step 3: Query the abnormal information of the transaction in the data set, analyze the attribute categories in the solution, calculate the information gain rate of each attribute, select the attribute with the highest information gain rate to create a child node with the same name, and mark its characteristic value. If a node with the same attribute name and characteristic value already exists, it will not be created again.

[0087] For example, for a deposit transaction, the abnormal situation information is "The card status is abnormal, please contact the issuing bank for processing." The attribute with the highest information gain rate is "The card status is abnormal." Its characteristic value is "The card status is abnormal." Therefore, a "Card status is abnormal" child node is established.

[0088] Step 4: Add a subnode with the same name as the transaction name under the node and mark its characteristic value.

[0089] For example, for deposit transactions, a child node named "Deposit Transaction" is created with the characteristic values ​​of counter, account involved, credit card, cash, balance increase, and upstream and downstream involved.

[0090] Step 5: Query the dataset for the exception handling plan corresponding to each exception category for the transaction. Analyze the attribute categories in the plan, calculate the information gain rate for each attribute, select the attribute with the highest information gain rate, create a leaf node with the same name, and annotate its eigenvalue. If a node with the same attribute name and eigenvalue already exists, it will not be created again.

[0091] For example, in a deposit transaction, the exception information is "The card status is abnormal, please contact the issuing bank for processing." The corresponding exception handling solution is "Modify the database record and adjust the status of this card to normal." The attribute with the highest calculated information gain rate is "Modify Database." Therefore, a "Modify Database" leaf node is created under the "Abnormal Card Status" node, and the characteristic value "CARD STATE" is marked.

[0092] Step 6: Recursively loop the above steps to build all leaf nodes and generate a decision tree

[0093] According to an embodiment of the present disclosure, after executing the first exception handling strategy, the method further includes: maintaining the preset machine learning model, wherein maintaining the preset machine learning model includes: obtaining second training data, wherein the second training data includes: second transaction information, second transaction attributes, second exception information, second exception attributes, and a second preset exception handling strategy; matching the parent node in the decision tree model based on the second transaction attributes; establishing a child node based on the second exception attributes and the second transaction information; and establishing a leaf node based on the second preset exception handling strategy.

[0094] Specifically, the second training data is generated during use, and data generated after regularly using the decision tree can be used as the second training data.

[0095] In a typical scenario, combined with Figure 5 As shown in the figure, the process of establishing the incremental abnormal transaction decision tree is as follows:

[0096] Step 1: Analyze the input data, obtain the attribute categories of the transaction, calculate the information gain rate of each attribute, select the attribute with the highest information gain rate, and establish a parent node with the same name, while marking its characteristic value.

[0097] For example, for a withdrawal transaction, its attributes include: over-the-counter transaction, account-related transaction, credit card transaction, cash transaction, balance reduction, and upstream and downstream transactions. The attribute with the highest information gain rate is "credit card transaction", and its characteristic value is "CREDIT CARD".

[0098] Step 2: Use the feature value to query the existing training set and obtain the parent node with the highest feature value similarity.

[0099] For example, for a withdrawal transaction, the feature value is "CREDIT CARD", and the parent node with the highest feature value similarity is the parent node of "Credit Card Transaction".

[0100] Step 3: Analyze the input data, obtain information about abnormal transactions, extract their eigenvalues, use the eigenvalues ​​to query the existing training set, and obtain the child node with the highest eigenvalue similarity under the parent node.

[0101] For example, for a withdrawal transaction, the abnormal situation information is "The card status is abnormal, please contact the issuing bank for processing", and its characteristic value is "The card status is abnormal". Under the "Credit Card Transaction" node, the sub-node with the highest characteristic value similarity is the "Card Status is Abnormal".

[0102] Step 4: Add a child node with the same transaction name under the parent node and mark its characteristic value.

[0103] For example, for a withdrawal transaction, create a child node named "Withdrawal Transaction" with characteristic values ​​of counter, account involved, credit card, cash type, balance reduction, and upstream and downstream involved.

[0104] Step 5: Get the child node with the highest eigenvalue similarity under the parent node.

[0105] For example, for a cash withdrawal transaction, the characteristic values ​​are counter, account involved, credit card, cash, balance reduction, and upstream and downstream involved. The sub-node with the highest characteristic value similarity under the node "Abnormal Card Status" is "2801".

[0106] Step 6: Obtain the exception handling solution leaf node under the child node with the highest similarity, replace the feature value therein with the feature value of the cost node, and generate a leaf node.

[0107] For example, for a withdrawal transaction, the node with the highest feature value similarity is the "Withdrawal Transaction" child node. The "Modify Database" leaf node is obtained, while retaining the same feature value "CARD STATE". The "Modify Database" leaf node is established to generate a decision tree.

[0108] Based on the above transaction testing method, the present disclosure also provides a transaction testing device. Figure 6 The device is described in detail.

[0109] Figure 6 The structural block diagram of the transaction testing device according to an embodiment of the present disclosure is schematically shown.

[0110] like Figure 6 As shown, the transaction testing device 600 of this embodiment includes a testing module 610 , an anomaly detection module 620 , a strategy generation module 630 and an anomaly handling module 640 .

[0111] The test module 610 is used to perform transaction testing based on the test case parameters. In one embodiment, the test module 610 can be used to perform the operation S210 described above, which will not be described in detail here.

[0112] The abnormality detection module 620 is used to detect whether the transaction test is in an abnormal state. In one embodiment, the abnormality detection module 620 can be used to perform the operation S220 described above, which will not be repeated here.

[0113] The strategy generation module 630 is used to generate a first exception handling strategy based on a preset machine learning model when the transaction test is in an abnormal state. In one embodiment, the strategy generation module 630 can be used to perform the operation S230 described above, which will not be repeated here.

[0114] The exception handling module 640 is used to execute the first exception handling strategy. In one embodiment, the exception handling module 640 can be used to execute the operation S240 described above, which will not be described in detail here.

[0115] In order to solve the technical problem of low efficiency of automated transaction testing, in the embodiments of the present disclosure, by periodically detecting whether the transaction test status is abnormal, and in the event of an abnormal state, generating and executing an exception handling strategy through a machine learning model, the automated transaction test interruption caused by incorrect test case parameters is corrected to ensure the continuity of the transaction test process and thus improve efficiency. In addition, the test case parameters obtained during the test process can be guaranteed to be complete and correct, avoiding distortion of test results due to configuration problems, and effectively ensuring the accuracy of test results.

[0116] According to an embodiment of the present disclosure, the strategy generation module is further used to generate a second exception handling strategy based on a preset machine learning model when the first exception handling strategy fails to repair the abnormal state; and execute the second exception handling strategy.

[0117] According to an embodiment of the present disclosure, after executing the first exception handling strategy, the method further includes: if the first exception handling strategy fails to repair the abnormal state, recording the test case, the abnormal state, and the first exception handling strategy.

[0118] According to an embodiment of the present disclosure, the strategy generation module is further used to query the case library based on the test case to match the third exception handling strategy; and the exception handling module is used to execute the third exception handling strategy to ensure the normal execution of the transaction test.

[0119] According to an embodiment of the present disclosure, the preset machine learning model includes a decision tree model, and the device also includes a model training module: used to obtain first training data, the first training data including: first transaction information, first transaction attribute, first exception information, first exception attribute and first preset exception handling strategy; establish a parent node based on the first transaction attribute of the first transaction attribute; establish a child node based on the first exception attribute and the first transaction information; and establish a leaf node based on the first preset exception handling strategy.

[0120] According to an embodiment of the present disclosure, the model training module is also used to obtain second training data, wherein the second training data includes: second transaction information, second transaction attributes, second exception information, second exception attributes and a second preset exception handling strategy; matching the parent node in the decision tree model based on the second transaction attributes; establishing a child node based on the second exception attributes and the second transaction information; and establishing a leaf node based on the second preset exception handling strategy.

[0121] According to embodiments of the present disclosure, any multiple modules among the testing module 610, anomaly detection module 620, policy generation module 630, and anomaly handling module 640 may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present disclosure, at least one of the testing module 610, anomaly detection module 620, policy generation module 630, and anomaly handling module 640 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of any of these. Alternatively, at least one of the testing module 610 , the anomaly detection module 620 , the policy generation module 630 , and the anomaly handling module 640 may be at least partially implemented as a computer program module, which may perform corresponding functions when executed.

[0122] Figure 7 The block diagram of an electronic device suitable for implementing the transaction testing method according to an embodiment of the present disclosure is schematically shown.

[0123] like Figure 7As shown, the electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage unit 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.

[0124] Various programs and data required for the operation of the electronic device 900 are stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 executes the various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also execute the various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.

[0125] According to an embodiment of the present disclosure, electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to bus 904. Electronic device 900 may also include one or more of the following components connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or modem. Communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 910 as needed, so that computer programs read from the removable media can be installed into storage section 908 as needed.

[0126] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.

[0127] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above, and / or one or more memories other than ROM 902 and RAM 903.

[0128] The embodiments of the present disclosure also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiments of the present disclosure.

[0129] The computer program executes the above functions defined in the system / device of the embodiment of the present disclosure when the processor 901 executes the computer program. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0130] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0131] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the processor 901, the above-described functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.

[0132] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0133] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0134] Those skilled in the art will appreciate that the features described in the various embodiments of the present disclosure may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in the present disclosure. In particular, the features described in the various embodiments of the present disclosure may be combined and / or coupled in various ways without departing from the spirit and teachings of the present disclosure. All such combinations and / or couplings fall within the scope of the present disclosure.

[0135] The above describes the embodiments of the present disclosure. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A transaction testing method, characterized in that: The method comprises: Execute transaction tests based on test case parameters; Detecting whether the transaction test is in an abnormal state; When the transaction test is in an abnormal state, generating a first abnormality handling strategy based on a preset machine learning model; and The first exception handling strategy is executed.

2. The method according to claim 1, after executing the first exception handling strategy, further comprising: If the first exception handling strategy fails to fix the abnormal state, generating a second exception handling strategy based on a preset machine learning model; as well as The second exception handling strategy is executed.

3. The method according to claim 1, after executing the first exception handling strategy, further comprising: In the case where the first exception handling strategy fails to fix the abnormal state, the test case, the abnormal state, and the first exception handling strategy are recorded.

4. The method according to claim 1, after detecting whether the transaction test is in an abnormal state and before generating an exception handling strategy based on a preset machine learning model, further comprising: Querying a case library based on the test case to match a third exception handling strategy; as well as The third exception handling strategy is executed to ensure that the transaction test is executed normally.

5. The method according to any one of claims 1 to 4, wherein the preset machine learning model comprises a decision tree model, The method for establishing the preset machine learning model includes: Acquire first training data, the first training data including: first transaction information, first transaction attributes, first exception information, first exception attributes, and a first preset exception handling strategy; establishing a parent node based on the first transaction attribute of the first transaction attribute; Establishing a child node based on the first abnormal attribute and the first transaction information; and A leaf node is established based on the first preset exception handling strategy.

6. The method according to claim 5, after executing the first exception handling strategy, further comprising: Maintaining the preset machine learning model, Maintaining the preset machine learning model includes: Acquire second training data, the second training data including: second transaction information, second transaction attributes, second exception information, second exception attributes, and a second preset exception handling strategy; matching a parent node in the decision tree model based on the second transaction attribute; Establishing a child node based on the second abnormal attribute and the second transaction information; and A leaf node is established based on the second preset exception handling strategy.

7. A transaction testing device, characterized in that: The device comprises: A test module for executing transaction tests based on test case parameters; An anomaly detection module, used to detect whether the transaction test is in an abnormal state; a strategy generation module, configured to generate a first exception handling strategy based on a preset machine learning model when the transaction test is in an abnormal state; and An exception handling module is used to execute the first exception handling strategy.

8. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

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