Transaction order data verification method and device, storage medium and electronic equipment
By obtaining the actual transaction parameters and requested transaction parameters in the payment system, and using the preset parameter format conversion template for format conversion, the problems of low verification efficiency and high error rate in the existing technology are solved, and efficient and accurate automated verification is achieved.
Patent Information
- Application Number
- CN202411619124.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, payment systems need to accurately verify payment data during system testing, which is usually done manually, with low efficiency and high probability of error.
By obtaining the actual transaction parameters and requested transaction parameters of the target order, the preset parameter format conversion template is used to convert the requested transaction parameters into parameters consistent with the actual transaction parameter format, and then performing automatic verification.
It realizes automated transaction order data verification, improves verification efficiency and accuracy, reduces manual errors, and facilitates repeated verification by other users in the future.
Smart Images

Figure CN119579177A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of automated testing technology, and in particular to a transaction order data verification method, device, storage medium and electronic device. Background Art
[0002] When testing the payment system, when payment actions, refund actions, and query actions are involved in the acquiring system or the payment agency system, it is necessary to accurately verify the payment data of the acquiring system, such as payment orders, refund orders, payment records, payment records, refund records, query records, etc., including the status of the payment orders, the income and expenditure relationship, the acquiring amount, the refund order status, the refund amount, and the unit corresponding to the amount. In the prior art, manual verification is usually used, which has low verification efficiency and high error probability. Summary of the invention
[0003] In order to solve at least one of the technical problems mentioned above, the present disclosure proposes a transaction order data verification method, device, storage medium and electronic device.
[0004] According to one aspect of the present disclosure, a transaction order data verification method is provided, which includes:
[0005] Get the actual transaction parameters corresponding to the target order;
[0006] Acquiring a request transaction parameter corresponding to the target order based on the order identifier of the target order; the parameter format of the actual transaction parameter is inconsistent with that of the request transaction parameter;
[0007] The parameter format of the requested transaction parameter is converted based on a preset parameter format conversion template to obtain a converted transaction parameter; the preset parameter format conversion template is obtained based on analyzing and processing the parameter format of the actual transaction parameter;
[0008] Based on the verification result of the actual transaction parameters and the converted transaction parameters, an order verification result corresponding to the target order is determined.
[0009] In some possible implementations, the method further includes:
[0010] Performing parameter analysis on the actual transaction parameters to obtain multiple parameter fields contained in the actual transaction parameters and association information between the multiple parameter fields;
[0011] Based on the multiple parameter fields and the association information between the multiple parameter fields, information integration is performed to obtain a preset parameter format conversion template corresponding to the actual transaction parameters.
[0012] In some possible implementations, converting the parameter format of the request transaction parameter based on a preset parameter format conversion template to obtain the converted transaction parameter includes:
[0013] Based on the parameter mapping information, field matching is performed on each parameter field in the request transaction parameter and each parameter field in the preset parameter format conversion template to obtain a field matching result; the parameter mapping information is used to characterize the mapping relationship between each parameter field in the request transaction parameter and each parameter field in the preset parameter format conversion template;
[0014] Based on the field matching result, the field value corresponding to each parameter field of the request transaction parameter is filled into the matching parameter field of the preset parameter format conversion template to obtain the converted transaction parameter; the matching parameter field is the field in the preset parameter format conversion template that matches each parameter field.
[0015] In some possible implementations, the requested transaction parameters include requested transaction parameters corresponding to a plurality of order types, the preset parameter format conversion template includes preset parameter format conversion templates corresponding to the plurality of order types, and performing parameter format conversion on the requested transaction parameters based on the preset parameter format conversion template to obtain converted transaction parameters includes:
[0016] Based on a preset parameter format conversion template corresponding to a first order type, parameter format conversion is performed on the request transaction parameters corresponding to the first order type to obtain converted transaction parameters corresponding to the first order type, where the first order type is any order type among the multiple order types.
[0017] In some possible implementations, the request transaction parameters include first-type request transaction parameters and second-type request transaction parameters, the first-type request transaction parameters are used to characterize user-oriented parameters, and the second-type request transaction parameters are used to characterize hidden parameters within the system, and acquiring the request transaction parameters corresponding to the target order based on the order identifier of the target order includes:
[0018] At least one of the first type of request transaction parameters and the second type of request transaction parameters is acquired based on the order identifier of the target order to obtain the request transaction parameters.
[0019] In some possible implementations, the method further includes:
[0020] Obtain the target order type of the target order;
[0021] The preset parameter format conversion template is obtained based on the target order type.
[0022] In some possible implementations, the method further includes:
[0023] When the order verification result indicates that the actual transaction parameters are inconsistent with the converted transaction parameters, the actual transaction parameters and the converted transaction parameters are displayed, and the abnormal parameter fields in the actual transaction parameters, the field values of the abnormal parameter fields in the actual transaction parameters, the abnormal parameter fields in the converted transaction parameters, and the field values of the abnormal parameter fields in the actual transaction parameters are highlighted.
[0024] According to a second aspect of the present disclosure, a transaction order data verification device is provided, the device comprising:
[0025] The actual transaction parameter acquisition module is used to obtain the actual transaction parameters corresponding to the target order;
[0026] A request transaction parameter acquisition module, used for acquiring a request transaction parameter corresponding to the target order based on the order identifier of the target order; the parameter format of the actual transaction parameter is inconsistent with that of the request transaction parameter;
[0027] A format conversion module, used for performing parameter format conversion on the requested transaction parameters based on a preset parameter format conversion template to obtain converted transaction parameters; the preset parameter format conversion template is obtained based on analyzing and processing the parameter format of the actual transaction parameters;
[0028] A verification module is used to determine an order verification result corresponding to the target order based on the verification result of the actual transaction parameter and the converted transaction parameter.
[0029] According to a third aspect of the present disclosure, there is provided an electronic device comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the transaction order data verification method as described in any one of the first aspects by executing the instructions stored in the memory.
[0030] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the transaction order data verification method as described in any one of the first aspects.
[0031] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
[0032] The implementation of this disclosure has the following beneficial effects:
[0033] Obtain the actual transaction parameters corresponding to the target order; obtain the request transaction parameters corresponding to the target order based on the order identifier of the target order; the parameter formats of the actual transaction parameters and the request transaction parameters are inconsistent; convert the parameter format of the request transaction parameters based on the preset parameter format conversion template to obtain the converted transaction parameters; the preset parameter format conversion template is obtained based on the analysis and processing of the parameter format of the actual transaction parameters; based on the verification results of the actual transaction parameters and the converted transaction parameters, determine the order verification result corresponding to the target order. After converting the request transaction parameters into parameters consistent with the format of the actual transaction parameters through the preset parameter format conversion template, automatic verification is performed to save manpower, improve the accuracy and efficiency of the verification of the actual transaction parameters, and convert the request transaction parameters into the same format as the actual transaction parameters at one time, which is convenient for subsequent repeated verification by other users.
[0034] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments or prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0036] Figure 1 A schematic diagram showing a flow chart of a transaction order data verification method according to an embodiment of the present disclosure;
[0037] Figure 2 A schematic diagram showing a flow chart of a method for determining a preset parameter format conversion template according to an embodiment of the present disclosure;
[0038] Figure 3 A schematic diagram showing a flow chart of a method for determining post-conversion transaction parameters according to an embodiment of the present disclosure;
[0039] Figure 4 A schematic diagram of a web page showing a payment order verification implementation method according to an embodiment of the present disclosure;
[0040] Figure 5 A schematic diagram showing the structure of a preset parameter format conversion template for a payment order according to an embodiment of the present disclosure;
[0041] Figure 6 A schematic diagram showing the structure of a transaction order data verification device according to an embodiment of the present disclosure is shown;
[0042] Figure 7A block diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0045] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0046] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0047] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0048] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0049] Figure 1 A flow chart of a transaction order data verification method according to an embodiment of the present disclosure is shown as follows: Figure 1 As shown, the above method includes:
[0050] S101. Obtaining actual transaction parameters corresponding to the target order;
[0051] The actual transaction parameters are used to characterize the order information that will be generated after the first party operates in the transaction operation, and the data after the order information is stored in the database. Exemplarily, the first party may be a buyer, and the order information includes but is not limited to the order number, amount, and user identification code. The actual transaction parameters that need to be verified for the target order are obtained from the database based on the order representation of the target order.
[0052] The parameter content of the actual transaction parameter includes a parameter field and a field value corresponding to the parameter field.
[0053] The target order includes but is not limited to one or more of a payment order, a refund order, a payment flow order, a payment and collection relationship order, a payment order and a refund flow order. The actual transaction parameters include type transaction parameters corresponding to at least one order type. The order type includes but is not limited to payment type, refund type, payment flow type, payment and collection relationship type, payment flow type and refund flow type.
[0054] S102, acquiring the requested transaction parameters corresponding to the target order based on the order identifier of the target order; the parameter formats of the actual transaction parameters and the requested transaction parameters are inconsistent;
[0055] The order identifier of the target order may be an order number, or other unique identifying information. The requested transaction parameters are used to characterize the order information generated by the second party in the transaction operation. Exemplarily, the second party may be the seller. The requested transaction parameters are reference parameters of the actual transaction parameters.
[0056] The parameter format of the actual transaction parameters may be a table format, the parameter format of the request transaction parameters may be a string format, and the names of the parameter fields in the actual transaction parameters are inconsistent with the names of the parameter fields in the request transaction parameters.
[0057] S103, converting the parameter format of the requested transaction parameter based on a preset parameter format conversion template to obtain a converted transaction parameter; the preset parameter format conversion template is obtained based on analyzing and processing the parameter format of the actual transaction parameter;
[0058] The preset parameter format conversion template is a template with the same parameter fields as the actual transaction order. The converted transaction parameters are obtained by filling the field values of the preset parameter format conversion template based on the request transaction parameters. The parameter fields of the converted transaction parameters are consistent with the parameter field format of the actual transaction order. The preset parameter format conversion template has fixed parameters and variable parameters. The fixed parameters are used to represent the common parameters of different orders, and the variable parameters are used to represent the variable parameters of different orders. Fill the variable parameters in the preset parameter format conversion template based on the request transaction parameters to obtain the converted transaction parameters.
[0059] S104. Based on the verification results of the actual transaction parameters and the converted transaction parameters, determine the order verification result corresponding to the target order.
[0060] The field values corresponding to the parameter fields of the actual transaction parameters are verified one by one with the field values corresponding to the parameter fields of the converted transaction parameters to obtain the verification results of the actual transaction parameters and the converted transaction parameters. The verification results of the actual transaction parameters and the converted transaction parameters are the order verification results corresponding to the target order.
[0061] The order verification results include the inconsistency between the actual transaction parameters and the converted transaction parameters and the consistency between the actual transaction parameters and the converted transaction parameters. The inconsistency between the actual transaction parameters and the converted transaction parameters means that there are parameter fields with inconsistent verification between the actual transaction parameters and the converted transaction parameters. The consistency between the actual transaction parameters and the converted transaction parameters means that all parameter fields of the actual transaction parameters are consistent with all parameter fields of the converted transaction parameters. When the actual transaction parameters and the converted transaction parameters are inconsistent, it means that there is a problem with the actual transaction parameters. The link that causes the problem with the actual transaction parameters may be a problem with the order information generated after the first party's operation, or a problem with the data after the order information is stored in the database. The specific link where the problem occurs needs to be further determined by the user.
[0062] In some specific embodiments, the present application can be implemented through an automated testing framework (Robot Framework), introducing a first keyword for calling actual transaction parameters, a second keyword for calling request transaction parameters, and a third keyword for a preset parameter format conversion template. The target order is a payment order, and the payment order includes but is not limited to the order number, payment amount, payment type, order quantity, and date information. The preset parameter format conversion template corresponding to the payment order is called, and the variable parameters of the preset parameter format conversion template include but are not limited to the order number, payment amount, payment type, order quantity, and date information, and the fixed parameters of the preset parameter format conversion template include but are not limited to the payment application and the payment information calling path.
[0063] The above technical solution converts the requested transaction parameters into parameters consistent with the actual transaction parameter format through a preset parameter format conversion template, and then performs automatic verification, which saves manpower, improves the accuracy and efficiency of the actual transaction parameter verification, and formats the requested transaction parameters to facilitate subsequent verification by other users.
[0064] See also Figure 2 In some embodiments, the method further comprises:
[0065] S201, performing parameter analysis on actual transaction parameters to obtain multiple parameter fields contained in the actual transaction parameters and association information between the multiple parameter fields;
[0066] S202: Integrate information based on multiple parameter fields and association information between the multiple parameter fields to obtain a preset parameter format conversion template corresponding to the actual transaction parameters.
[0067] The association information is used to characterize the order relationship between parameter fields or the layout relationship between parameter fields. The parameter fields of the actual transaction parameters are extracted, and the association information between multiple parameter fields is determined. The preset parameter format conversion template is determined according to the parameter fields and the association information between the parameter fields.
[0068] In some embodiments, if the actual transaction parameters are the actual transaction parameters corresponding to the payment relationship order, the parameter fields of the actual transaction parameters include, but are not limited to, the order number, the payment method, the payer identification code, the order amount, and the payee identification code in sequence, and the order relationship is that the first parameter field is the order number, the second parameter field is the payment method, the third parameter field is the payer identification code, the fourth parameter field is the order amount, and the fifth parameter field is the payee identification code. According to the parameter fields of the actual transaction parameters corresponding to the payment relationship order and the order relationship between the parameter fields, a preset parameter format conversion template corresponding to the payment relationship order is generated.
[0069] In some embodiments, if the actual transaction parameters are the actual transaction parameters corresponding to the payment relationship order, the parameter fields of the actual transaction parameters include but are not limited to the order number, payment method, payee identification code, order amount, payee identification code and payee account number, and the layout relationship is that the first cell of the first row is the order number, the third cell of the first row is the payment method, the first cell of the second row is the payee identification code, the second cell of the second row is the order amount, the first cell of the third row is the payee identification code, and the second cell of the third row is the payee account number. According to the parameter fields of the actual transaction parameters corresponding to the payment relationship order and the layout relationship of the parameter fields, a preset parameter format conversion template corresponding to the payment relationship order is generated.
[0070] In other embodiments, the preset parameter format conversion template may be preset by the user according to the parameter fields of the actual transaction parameters and the association relationship between the parameter fields.
[0071] The above technical solution extracts the parameter fields of the actual transaction parameters and the association between the parameter fields, and generates a corresponding preset parameter format conversion template. The preset parameter format conversion template can be reused and can improve the efficiency and accuracy of order verification.
[0072] See also Figure 3 In some embodiments, the parameter format of the requested transaction parameter is converted based on a preset parameter format conversion template to obtain the converted transaction parameter, including:
[0073] S1031. Based on the parameter mapping information, perform field matching on each parameter field in the request transaction parameter and each parameter field in the preset parameter format conversion template to obtain a field matching result; the parameter mapping information is used to characterize the mapping relationship between each parameter field in the request transaction parameter and each parameter field in the preset parameter format conversion template;
[0074] S1032. Based on the field matching result, fill the field value corresponding to each parameter field of the requested transaction parameter into the matching parameter field of the preset parameter format conversion template to obtain the converted transaction parameter; the matching parameter field is the field in the preset parameter format conversion template that matches each parameter field.
[0075] Obtain parameter mapping information, and perform associative matching through the parameter fields of the request transaction parameters and the parameter fields of the preset parameter format conversion template to obtain field matching results. The field matching results are used to characterize the one-to-one matching relationship between the parameter fields of the request transaction parameters and the parameter fields of the preset parameter format conversion template. The matching parameter fields of the preset parameter format conversion template are parameter fields that match the parameter fields in the request transaction parameters. Based on the field matching results, fill the field value corresponding to each parameter field of the request transaction parameters into the matching parameter fields in the preset parameter format conversion template to obtain the converted transaction parameters.
[0076] In some embodiments, according to the field matching result, the field value corresponding to the first parameter field of the requested transaction parameter is filled into the second parameter field corresponding to the first parameter field in the preset parameter format conversion template to obtain the converted transaction parameter.
[0077] In some specific embodiments, the request transaction parameters include the first request parameter: 100001, the second request parameter: bank card, the third request parameter: 101451, the fourth request parameter: 1000 yuan, the fifth request parameter: 85401, and the sixth request parameter: 1521****227. The parameter fields in the preset parameter format conversion template include but are not limited to: order number, payment method, payee identification code, order amount, payee identification code, and payee account number. The parameter mapping information is that the first request parameter is mapped to the order number, the second request parameter is mapped to the payment method, the third request parameter is mapped to the payee identification code, the fourth request parameter is mapped to the order amount, the fifth request parameter is mapped to the payee identification code, and the sixth request parameter is mapped to the payee account number. According to the parameter mapping information, the field matching results of the parameter fields of the requested transaction parameters and the parameter fields of the preset parameter format conversion template are obtained. According to the field matching results, the field values corresponding to each parameter field of the requested transaction parameters: 100001, bank card, 101451, 1000 yuan, 85401 and 1521****27 are sequentially filled into the parameter fields of the preset parameter format conversion template to obtain the converted transaction parameters, namely, order number: 100001, payment method: bank card, payer identification code: 101451, order amount: 1000 yuan, payee identification code: 85401, payee account number: 1521****27.
[0078] The above technical solution converts the request parameters into converted transaction parameters that are consistent with the actual request parameter format through a preset parameter format conversion template, thereby improving the efficiency and accuracy of the actual request parameter verification and increasing the reusability of order verification.
[0079] In some embodiments, the request transaction parameters include the request transaction parameters corresponding to multiple order types, the preset parameter format conversion template includes the preset parameter format conversion templates corresponding to multiple order types, and the request transaction parameters are converted into parameter formats based on the preset parameter format conversion template to obtain the converted transaction parameters, including:
[0080] Based on a preset parameter format conversion template corresponding to the first order type, parameter format conversion is performed on the request transaction parameters corresponding to the first order type to obtain converted transaction parameters corresponding to the first order type, where the first order type is any order type among multiple order types.
[0081] In some embodiments, order types include but are not limited to payment orders, refund orders, payment flow orders, payment and collection relationship orders, payment orders and refund flow orders. If the target order includes but is not limited to multiple ones of payment orders, refund orders, payment flow orders, payment and collection relationship orders, payment orders and refund flow orders, the actual request parameters corresponding to the target order also correspond to but are not limited to multiple ones of the actual request parameters corresponding to the payment order, the actual request parameters corresponding to the refund order, the actual request parameters corresponding to the payment flow order, the actual request parameters corresponding to the payment relationship order, the actual request parameters corresponding to the payment order and the actual request parameters corresponding to the refund flow order. The preset parameter format conversion template includes but is not limited to multiple ones of the preset parameter format conversion template corresponding to the payment order, the preset parameter format conversion template corresponding to the refund order, the preset parameter format conversion template corresponding to the payment flow order, the preset parameter format conversion template corresponding to the payment relationship order, the preset parameter format conversion template corresponding to the payment order and the preset parameter format conversion template corresponding to the refund flow order.
[0082] If the first order type is a refund order type, obtain a preset parameter format conversion template corresponding to the refund order type, obtain the request transaction parameters corresponding to the refund order type from the request transaction parameters, perform parameter format conversion on the request transaction parameters corresponding to the refund order type based on the preset parameter format conversion template corresponding to the refund order type, and obtain the converted transaction parameters corresponding to the refund order type.
[0083] In the above technical solution, each order type has an adaptive preset parameter format conversion template, which is suitable for order verification occasions of various order types and solves the verification problems of different order types.
[0084] In some embodiments, the request transaction parameters include first-type request transaction parameters and second-type request transaction parameters, the first-type request transaction parameters are used to characterize user-oriented parameters, and the second-type request transaction parameters are used to characterize hidden parameters within the system. Acquiring the request transaction parameters corresponding to the target order based on the order identifier of the target order includes:
[0085] At least one of the first type of request transaction parameters and the second type of request transaction parameters is acquired based on the order identifier of the target order to obtain the request transaction parameters.
[0086] The first type of request transaction parameters can be obtained directly from the request interface, including but not limited to order number, payment method, payer identification code, order amount and payee identification code; the request interface includes but is not limited to payment interface, refund interface, account splitting interface, account reconciliation interface and payment cancellation interface. The second type of request transaction parameters can be obtained from within the system, including but not limited to the system to which the user belongs, internal merchant number and internal user number.
[0087] In some embodiments, if the actual transaction parameters of the target order are user-oriented transaction data, the request transaction parameters are obtained from the request interface according to the order identifier of the target order. Exemplarily, the target order is a payment order, and the request transaction parameters of the payment order include but are not limited to the order number, payment method, payee identification code, order amount and payee identification code, and the request transaction parameters of the payment order are directly obtained from the payment request interface.
[0088] If the actual transaction parameters of the target order are hidden data for management personnel, the requested transaction parameters are obtained from the system according to the order identifier of the target order. Exemplarily, the target order is an internal system order, which includes but is not limited to the system to which the user belongs, the internal merchant number and the internal user number.
[0089] If the actual transaction parameters of the target order include both transaction data for users and hidden data for managers, the request transaction parameters of the target order are obtained from the payment request interface and the internal system.
[0090] The above technical solution requests transaction parameters including multiple types of parameters, which can support the diversity and complexity of order verification to the greatest extent, adapt to various verification scenarios, meet different verification requirements, and thus complete the verification work conveniently and quickly.
[0091] In some embodiments, the method further comprises:
[0092] Get the target order type of the target order;
[0093] Get the preset parameter format conversion template based on the target order type.
[0094] In some embodiments, preset parameter format conversion templates corresponding to various order types are pre-set, and during verification, the corresponding preset parameter format conversion template is directly obtained through the target order type of the target order.
[0095] In some embodiments, the preset parameter format conversion template includes but is not limited to a preset parameter format conversion template corresponding to a payment order, a preset parameter format conversion template corresponding to a refund order, a preset parameter format conversion template corresponding to a payment flow order, a preset parameter format conversion template corresponding to a payment relationship order, a preset parameter format conversion template corresponding to a payment order, and a preset parameter format conversion template corresponding to a refund flow order.
[0096] Determine that the target order type of the target order is a refund order type, and obtain a preset parameter format conversion template corresponding to the refund order type.
[0097] The above technical solution directly obtains the preset parameter format conversion template corresponding to the target order according to the target order type of the target order to perform order verification, which is convenient and fast, improves the efficiency of verification, and the reusability of the verification method.
[0098] In some embodiments, the method further comprises:
[0099] When the order verification result indicates that the actual transaction parameters and the converted transaction parameters are inconsistent, the actual transaction parameters and the converted transaction parameters are displayed, and the abnormal parameter fields in the actual transaction parameters, the field values of the abnormal parameter fields in the actual transaction parameters, the abnormal parameter fields in the converted transaction parameters, and the field values of the abnormal parameter fields in the actual transaction parameters are highlighted.
[0100] Abnormal parameter fields are parameter fields that do not match between actual transaction parameters and converted transaction parameters. The highlighting may be color-coded or underline-coded, and there is no limitation here.
[0101] If the order verification result indicates that the actual transaction parameters are inconsistent with the converted transaction parameters, the order verification result is displayed, and the parameter fields in the actual transaction parameters and the converted transaction parameters that are inconsistent with the verification and their corresponding field values are prominently marked and displayed.
[0102] In the above technical solution, if there is inconsistency in the verification, the verification result and the parameter fields where the actual transaction parameters and the converted transaction parameters are inconsistent in the verification are prominently indicated and displayed, so that the user can quickly locate the abnormal parameters in the actual transaction parameters.
[0103] The following is a specific example to illustrate the specific implementation process of this application.
[0104] Using the automated testing framework (Robot When the automatic test of acquiring or paying on behalf of the customer is performed by using the payment processing framework, it is necessary to verify whether the actual result of the target order after acquiring, that is, the actual transaction parameters, match the expected result, that is, the converted transaction parameters. For the processing of the expected result, the corresponding expected result can be automatically generated by the target order verification method "TRUE" or "FALSE" in the form of a switch. When the switch is set to "TRUE", it means that the request transaction parameters of the target order need to be obtained from the request interface, and the request transaction parameters are obtained from the request interface, and the corresponding converted transaction parameters, that is, the expected result, are automatically generated according to the preset parameter format conversion template and the request transaction parameters; when the switch is set to "FALSE", it means that the request transaction parameters of the target order need to be obtained from the back-end system, and the request transaction parameters are obtained from the back-end system, and the corresponding converted transaction parameters, that is, the expected result, are automatically generated according to the preset parameter format conversion template and the request transaction parameters; through these two parameter acquisition methods, the verification of the actual transaction parameters is more flexible, and by introducing the verification method keyword, the comparison and verification of the expected result and the actual result can be completed, so as to achieve the purpose of automatic verification of the payment result. In addition, in order to facilitate the management and maintenance of the expected results, the management of the expected results is managed and maintained by developing a set of web pages (WEB).
[0105] Take the target order as a payment order as an example. Figure 4 As shown:
[0106] The expected result, i.e. the keyword of the converted transaction parameter, is ${exp_data}. Based on the expected result's merchant order number ${exp_data["mch_no"]} and external order number ${exp_data["out_order_id"]}, the table value is divided to calculate the data table identification code ${table_no}. The actual result, i.e. the actual transaction parameter, is queried. The actual result is ${ac_data}, which is called by the expected result's commodity. The actual result obtains the parameter field value from the data table whose data table identification code is ${table_no}:
[0107] SELECT*FROM tb_pay_order_${table_no}
[0108] where out_order_id="${exp_data["out_order_id"]}" and mch_no="${exp_data["mch_no"]}".
[0109] Get the length of the actual result ${ac_data_len}. If the length of the parameter in the actual result is greater than 1, that is, ${ac_data_len}>'1', the actual result ${ac_data} and the expected result ${exp_data} are verified.
[0110] The expected result of the target order is generated based on the preset parameter format conversion template corresponding to the target order and the requested transaction parameters. The preset parameter format conversion template corresponding to the target order is as follows: Figure 5 As shown, the variable parameters include order number (pay_order_id), product name (src_product), product code (product_code), payment type (pay_type), order status (order_status), payment amount (order_amount), payment currency (currency_code), payment date (data_acct), order information (order_memo), merchant order number (mch_no) and external order number (out_order_id), and the fixed parameters of the preset parameter format conversion template include business code (biz_code), application name (IPAY) and notification path (notify_url). The field value of the variable parameter field is determined based on the request transaction parameters.
[0111] See also Figure 6 According to a second aspect of the present disclosure, a transaction order data verification device is provided, the device comprising:
[0112] The actual transaction parameter acquisition module 10 is used to obtain the actual transaction parameters corresponding to the target order;
[0113] The request transaction parameter acquisition module 20 is used to acquire the request transaction parameters corresponding to the target order based on the order identifier of the target order; the parameter format of the actual transaction parameters is inconsistent with that of the request transaction parameters;
[0114] The format conversion module 30 is used to convert the parameter format of the requested transaction parameter based on a preset parameter format conversion template to obtain the converted transaction parameter; the preset parameter format conversion template is obtained based on analyzing and processing the parameter format of the actual transaction parameter;
[0115] The verification module 40 is used to determine the order verification result corresponding to the target order based on the verification result of the actual transaction parameters and the converted transaction parameters.
[0116] In some embodiments, the apparatus further comprises:
[0117] A parameter analysis module is used to perform parameter analysis on actual transaction parameters to obtain multiple parameter fields contained in the actual transaction parameters and association information between the multiple parameter fields;
[0118] The information integration module is used to integrate information based on multiple parameter fields and the associated information between the multiple parameter fields to obtain a preset parameter format conversion template corresponding to the actual transaction parameters.
[0119] In some embodiments, the format conversion module 30 includes:
[0120] A field matching unit, used to perform field matching on each parameter field in the request transaction parameter and each parameter field in the preset parameter format conversion template based on the parameter mapping information to obtain a field matching result; the parameter mapping information is used to characterize the mapping relationship between each parameter field in the request transaction parameter and each parameter field in the preset parameter format conversion template;
[0121] The field value filling unit is used to fill the field value corresponding to each parameter field of the request transaction parameter into the matching parameter field of the preset parameter format conversion template based on the field matching result to obtain the converted transaction parameter; the matching parameter field is the field in the preset parameter format conversion template that matches each parameter field.
[0122] In some embodiments, the request transaction parameters include request transaction parameters corresponding to multiple order types, the preset parameter format conversion template includes preset parameter format conversion templates corresponding to multiple order types, and the format conversion module 30 includes:
[0123] A converted transaction parameter determination unit is used to convert the parameter format of the request transaction parameters corresponding to the first order type based on a preset parameter format conversion template corresponding to the first order type to obtain the converted transaction parameters corresponding to the first order type, where the first order type is any order type among multiple order types.
[0124] In some embodiments, the request transaction parameters include first-type request transaction parameters and second-type request transaction parameters. The first-type request transaction parameters are used to characterize user-oriented parameters, and the second-type request transaction parameters are used to characterize hidden parameters within the system. The request transaction parameter acquisition module 20 includes:
[0125] The parameter acquisition unit is used to acquire at least one of the first type of request transaction parameters and the second type of request transaction parameters based on the order identifier of the target order to obtain the request transaction parameters.
[0126] In some embodiments, the apparatus further comprises:
[0127] An order type acquisition unit, used to acquire a target order type of a target order;
[0128] The conversion template acquisition module is used to obtain a conversion template in a preset parameter format based on a target order type.
[0129] In some embodiments, the apparatus further comprises:
[0130] The display unit is used to display the actual transaction parameters and the converted transaction parameters when the order verification result indicates that the actual transaction parameters and the converted transaction parameters are inconsistent, and to highlight the abnormal parameter fields in the actual transaction parameters, the field values of the abnormal parameter fields in the actual transaction parameters, the abnormal parameter fields in the converted transaction parameters, and the field values of the abnormal parameter fields in the actual transaction parameters.
[0131] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0132] An embodiment of the present application provides a transaction order data verification device, which may be a terminal or a server. The transaction order data verification device includes a processor and a memory, in which at least one instruction or at least one program is stored. The at least one instruction or the at least one program is loaded and executed by the processor to implement the transaction order data verification method provided in the above method embodiment.
[0133] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required for functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0134] The method embodiments provided in the embodiments of the present application can be executed in electronic devices such as mobile terminals, computer terminals, servers or similar computing devices. Figure 7 1 is a hardware structure block diagram of an electronic device for a transaction order data verification method provided in an embodiment of the present application. Figure 7As shown, the electronic device 900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 910 (the processor 910 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 930 for storing data, and one or more storage media 920 (such as one or more mass storage devices) for storing application programs 923 or data 922. Among them, the memory 930 and the storage medium 920 can be short-term storage or permanent storage. The program stored in the storage medium 920 may include one or more modules, each of which may include a series of instruction operations in the electronic device. Furthermore, the central processing unit 910 can be configured to communicate with the storage medium 920 to execute a series of instruction operations in the storage medium 920 on the electronic device 900. The electronic device 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input and output interfaces 940, and / or one or more operating systems 921, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0135] The input / output interface 940 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the electronic device 900. In one example, the input / output interface 940 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 940 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0136] It can be understood by those skilled in the art that Figure 7 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 7 More or fewer components as shown, or with Figure 7 Different configurations are shown.
[0137] An embodiment of the present application also provides a computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to a transaction order data verification method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the transaction order data verification method provided in the above method embodiment.
[0138] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0139] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0140] It can be seen from the embodiments of the transaction order data verification method, device, equipment, terminal, server, storage medium or computer program provided by the present application that the present application obtains the actual transaction parameters corresponding to the target order; obtains the request transaction parameters corresponding to the target order based on the order identifier of the target order; the parameter format of the actual transaction parameters is inconsistent with the parameter format of the request transaction parameters; the parameter format of the request transaction parameters is converted based on the preset parameter format conversion template to obtain the converted transaction parameters; the preset parameter format conversion template is obtained based on the analysis and processing of the parameter format of the actual transaction parameters; based on the verification results of the actual transaction parameters and the converted transaction parameters, the order verification result corresponding to the target order is determined. After the request transaction parameters are converted into parameters consistent with the format of the actual transaction parameters by the preset parameter format conversion template, automatic verification is performed to improve the accuracy and efficiency of the verification of the actual transaction parameters, and the request transaction parameters are formatted to facilitate subsequent verification by other users.
[0141] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of the present application are described. 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.
[0142] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0143] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0144] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A transaction order data verification method, characterized in that: The method comprises: Get the actual transaction parameters corresponding to the target order; Acquiring a request transaction parameter corresponding to the target order based on the order identifier of the target order; the parameter format of the actual transaction parameter is inconsistent with that of the request transaction parameter; The parameter format of the requested transaction parameter is converted based on a preset parameter format conversion template to obtain a converted transaction parameter; the preset parameter format conversion template is obtained based on analyzing and processing the parameter format of the actual transaction parameter; Based on the verification result of the actual transaction parameters and the converted transaction parameters, an order verification result corresponding to the target order is determined.
2. The method according to claim 1, characterized in that: The method further comprises: Performing parameter analysis on the actual transaction parameters to obtain multiple parameter fields contained in the actual transaction parameters and association information between the multiple parameter fields; Based on the multiple parameter fields and the association information between the multiple parameter fields, information integration is performed to obtain a preset parameter format conversion template corresponding to the actual transaction parameters.
3. The method according to claim 1, characterized in that The step of converting the parameter format of the requested transaction parameter based on a preset parameter format conversion template to obtain the converted transaction parameter includes: Based on the parameter mapping information, field matching is performed on each parameter field in the request transaction parameter and each parameter field in the preset parameter format conversion template to obtain a field matching result; the parameter mapping information is used to characterize the mapping relationship between each parameter field in the request transaction parameter and each parameter field in the preset parameter format conversion template; Based on the field matching result, the field value corresponding to each parameter field of the request transaction parameter is filled into the matching parameter field of the preset parameter format conversion template to obtain the converted transaction parameter; the matching parameter field is the field in the preset parameter format conversion template that matches each parameter field.
4. The method according to claim 1, characterized in that: The requested transaction parameters include the requested transaction parameters corresponding to a plurality of order types, the preset parameter format conversion template includes the preset parameter format conversion templates corresponding to the plurality of order types, and performing parameter format conversion on the requested transaction parameters based on the preset parameter format conversion template to obtain the converted transaction parameters includes: Based on a preset parameter format conversion template corresponding to the first order type, parameter format conversion is performed on the request transaction parameters corresponding to the first order type to obtain converted transaction parameters corresponding to the first order type, where the first order type is any order type among the multiple order types.
5. The method according to claim 1, characterized in that The request transaction parameters include first-type request transaction parameters and second-type request transaction parameters, the first-type request transaction parameters are used to characterize user-oriented parameters, and the second-type request transaction parameters are used to characterize hidden parameters within the system. The acquiring the request transaction parameters corresponding to the target order based on the order identifier of the target order includes: At least one of the first type of request transaction parameters and the second type of request transaction parameters is acquired based on the order identifier of the target order to obtain the request transaction parameters.
6. The method according to claim 1, characterized in that The method further comprises: Obtain the target order type of the target order; The preset parameter format conversion template is obtained based on the target order type.
7. The method according to claim 1, characterized in that The method further comprises: When the order verification result indicates that the actual transaction parameters are inconsistent with the converted transaction parameters, the actual transaction parameters and the converted transaction parameters are displayed, and the abnormal parameter fields in the actual transaction parameters, the field values of the abnormal parameter fields in the actual transaction parameters, the abnormal parameter fields in the converted transaction parameters, and the field values of the abnormal parameter fields in the actual transaction parameters are highlighted.
8. A transaction order data verification device, characterized in that: The device comprises: The actual transaction parameter acquisition module is used to obtain the actual transaction parameters corresponding to the target order; a request transaction parameter acquisition module, configured to acquire the request transaction parameter corresponding to the target order based on the order identifier of the target order; the parameter format of the actual transaction parameter is inconsistent with that of the request transaction parameter; A format conversion module, used for performing parameter format conversion on the requested transaction parameters based on a preset parameter format conversion template to obtain converted transaction parameters; the preset parameter format conversion template is obtained based on analyzing and processing the parameter format of the actual transaction parameters; A verification module is used to determine an order verification result corresponding to the target order based on the verification result of the actual transaction parameters and the converted transaction parameters.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the transaction order data verification method as described in any one of claims 1-7.
10. An electronic device, characterized in that: It includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements the transaction order data verification method as described in any one of claims 1 to 7 by executing the instructions stored in the memory.