CN110196802B - Test data processing method, device and server - Google Patents
Test data processing method, device and server Download PDFInfo
- Publication number
- CN110196802B CN110196802B CN201810159832.6A CN201810159832A CN110196802B CN 110196802 B CN110196802 B CN 110196802B CN 201810159832 A CN201810159832 A CN 201810159832A CN 110196802 B CN110196802 B CN 110196802B
- Authority
- CN
- China
- Prior art keywords
- account
- target
- accounts
- transaction
- reconciliation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 147
- 238000003672 processing method Methods 0.000 title claims abstract description 14
- 238000012545 processing Methods 0.000 claims abstract description 49
- 238000000034 method Methods 0.000 claims description 59
- 238000012546 transfer Methods 0.000 claims description 38
- 238000001914 filtration Methods 0.000 claims description 7
- 230000006399 behavior Effects 0.000 claims description 6
- 230000008859 change Effects 0.000 abstract description 10
- 230000009471 action Effects 0.000 abstract description 5
- 230000008569 process Effects 0.000 description 25
- 238000010586 diagram Methods 0.000 description 9
- 238000010276 construction Methods 0.000 description 8
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 8
- 238000007405 data analysis Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The invention provides a test data processing method, which comprises the following steps: receiving a test data processing instruction, wherein the test data processing instruction comprises a target time interval; the target time interval is a time period for the target transaction to occur; acquiring a target data set in test data according to the target time interval, wherein an account participating in target transaction and a flow record corresponding to the account are recorded in the target data set; and performing account reconciliation processing on the accounts participating in the target transaction according to the target data set, so that the accounts participating in the target transaction in the target data set are restored to a state before the accounts do not participate in the target transaction. The invention can restore the test data to the state before the payment action occurs, thereby ensuring that the test data has the same starting point of the change of the test data in the past test, avoiding recording the starting point of the change of the current test data before each test and reducing the workload.
Description
Technical Field
The present invention relates to the field of test data processing, and in particular, to a test data processing method, device and server.
Background
The online payment platform can provide quick online payment service for users, and in order to ensure the correct operation of the online payment platform, the online payment platform needs to be tested frequently. In the test process, as shown in fig. 1, a test account is acquired in an online payment platform, the payment behavior of a user is simulated through the test account to generate a flow record corresponding to the test account, and then the test process is completed by carrying out data analysis on the flow record.
For accurate data analysis, it is necessary to specify a test account balance before the generation of the payment action (start point of test data change) and a test account balance after the generation of the payment action (end point of test data change). Therefore, the start point of the test data change needs to be recorded before each test, thereby increasing the test workload. Especially in the pressure test link, the data volume of test data is great, and the influence on the test work efficiency is also obvious.
In addition, the balance of the test account is influenced by the flow record generated in the test process, and the balance of the test account is used as a starting point of the change of the test data in the next test, so that the test data of the adjacent test process cannot be completely independent, and the test effect is influenced.
Disclosure of Invention
In order to solve the technical problems, the invention provides a test data processing method, a test data processing device and a test data processing server. The invention is realized by the following technical scheme:
in a first aspect, a test data processing method includes:
receiving a test data processing instruction, wherein the test data processing instruction comprises a target time interval; the target time interval is a time period for the target transaction to occur;
acquiring a target data set in test data according to the target time interval, wherein an account participating in target transaction and a flow record corresponding to the account are recorded in the target data set;
and performing account reconciliation processing on the accounts participating in the target transaction according to the target data set, so that the accounts participating in the target transaction in the target data set are restored to a state before the accounts do not participate in the target transaction.
In a second aspect, a test data processing apparatus, the apparatus comprising:
the instruction acquisition module is used for receiving a test data processing instruction, wherein the test data processing instruction comprises a target time interval; the target time interval is a time period for the target transaction to occur;
the target data set acquisition module is used for acquiring a target data set in the test data according to the target time interval, wherein an account participating in target transaction and a flow record corresponding to the account are recorded in the target data set;
And the reconciliation module is used for reconciling accounts participating in the target transaction according to the target data set so as to restore the accounts participating in the target transaction in the target data set to a state before the accounts do not participate in the target transaction.
In a third aspect, a server is provided, wherein the server includes the test data processing device.
The invention provides a test data processing method, a device and a server. Specifically, the application has the following beneficial effects:
(1) After each test, the test data is processed according to the processing method of the invention, and the test data can be restored to the state before the payment action (the starting point of the change of the test data), thereby ensuring that the same starting point of the change of the test data is provided during the past test, avoiding recording the starting point of the change of the current test data before each test, and reducing the workload.
(2) In view of the fact that the adjacent test has the same starting point of test data change by using the method, the technical effect that the adjacent test processes are completely independent and do not affect each other is achieved by using the method.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a testing process provided in the background of the invention;
FIG. 2 is a schematic diagram of a test data processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a first payment type provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of a second payment type provided by an embodiment of the present invention;
FIG. 5 is a flowchart of a method for processing test data generated by different payment types according to an embodiment of the present invention;
FIG. 6 is a flowchart of a method for reconciling accounts involved in a target transaction using reconciliation rules corresponding to a first payment type provided by an embodiment of the invention;
FIG. 7 is a flowchart of a method for reconciling a target account based on the first reconciliation base data provided by an embodiment of the invention;
FIG. 8 is a flow chart of a transfer method provided by an embodiment of the present invention;
FIG. 9 is a flowchart of a method for reconciling accounts involved in a target transaction using reconciliation rules corresponding to a second payment type provided by an embodiment of the invention;
FIG. 10 is a flowchart of a method for reconciling a target account according to the second reconciliation base data provided by the embodiment of the invention;
FIG. 11 is a flow chart of reconciliation according to a balance total difference provided by an embodiment of the invention;
FIG. 12 is a schematic diagram of a first payment type funds flow provided by an embodiment of the invention;
FIG. 13 is a schematic diagram of a second payment type funds flow provided by an embodiment of the invention;
FIG. 14 is a block diagram of a test data processing apparatus provided in an embodiment of the present invention;
fig. 15 is a schematic diagram of a server structure according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In order to ensure the correct operation of the online payment platform, it is necessary to perform a pressure test on the online payment platform, that is, to use the online payment platform, simulate a large amount of payment behaviors to generate a large amount of test data, perform data analysis on the test data, and thereby test each function of the online payment platform. There are two common data analysis strategies in the prior art:
(1) T+1 accounting checks: all transaction data of the previous day are processed in the early morning of the next day, and T+1 accounting is divided into three links of general account accounting, general account checking and account checking. The timeliness of the T+1 accounting check is not high, and the check result can be obtained only the next day.
(2) And (3) checking real-time accounting: the operation is performed once every preset time, the preset time can be set according to the needs of a user, and in order to ensure the real-time performance, the preset time can be less than 10 minutes. The real-time accounting check is also divided into three links of general account checking, general account checking and account checking. Real-time accounting checks solve the problem of effectiveness, but for real-time reasons, the data of the real-time accounting checks are stored in memory and do not support querying or displaying.
T+1 accounting checkup and real-time accounting checkup, while giving access to timely knowledge of online paymate functionality through data analysis, has the following drawbacks:
(1) The data analysis objects of the T+1 accounting check and the real-time accounting check are all data of the online payment platform, and the test data and the real data are not distinguished, and only the data analysis result is presented. The test data cannot be analyzed and processed individually.
(2) T+1 accounting check and real-time accounting check can not carry out the reconciliation processing to test data to can 'T guarantee that every turn of test all has the same starting point that test data changed, can' T reach the test data mutual independence of adjacent test process, the technological effect that each other does not influence.
Based on this, an embodiment of the present invention provides a test data processing method, where the method is shown in fig. 2, and includes:
s101, receiving a test data processing instruction, wherein the test data processing instruction comprises a target time interval; the target time interval is a time period in which the target transaction occurs.
Specifically, the target time interval may be set according to an actual situation, and may be automatically acquired in response to a certain control instruction, and in a feasible embodiment, the target time interval is automatically obtained by taking the current time as an end point in response to a first preset control instruction, where the first preset control instruction includes a start point of the target time interval. In another possible embodiment, the starting point of the target time interval is automatically obtained by taking the current time as the end point, in response to a second preset control instruction, where the second preset control instruction includes the length of the target time interval.
The target time interval may also be automatically generated according to a preset algorithm. In a possible embodiment, a trigger time threshold may be set, and the method described in the embodiment of the present invention is started at each interval of the trigger time threshold, and the target time interval may be automatically obtained according to the trigger time threshold and the current time.
S102, acquiring a target data set in test data according to the target time interval, wherein an account participating in target transaction and a flow record corresponding to the account are recorded in the target data set.
In the embodiment of the invention, the test data and the real data can be stored in the online payment platform together, and in order to ensure that the test data and the real data are not mutually influenced, the test data and the real data are isolated and only the test data are processed.
In order to isolate the test data from the real data, the test account can be specially generated, and the generation rule of the test account is different from that of the real account, so that confusion is not caused. The payment behavior and the flow data generated by the test account belong to the test data, and the attribute (including account balance) of the test account also belongs to the test data.
The target data set is a set formed by test data obtained by taking a target time interval as a filter, and is also an object to be subjected to account adjustment processing in the embodiment of the invention.
S103, account reconciliation processing is carried out on the accounts participating in the target transaction according to the target data set, so that the accounts participating in the target transaction in the target data set are restored to a state before the accounts do not participate in the target transaction.
Before the payment action occurs, the account participating in the target transaction is in balance. In order to achieve the purpose of eliminating the influence of the payment behavior occurring in the target time interval on the balance of the test account, after reconciliation, the account participating in the target transaction is restored to the balance state.
With the development of online payment, online payment platforms can provide a wide variety of payment types, and reconciliation processing strategies for different payment types are also different. To enable support for different payment types, the online paymate may serve three users: the online payment platform can have three accounts, namely, a personal account (C account), a merchant account (B account) and a bank account. After the online paymate is successfully registered, the individual generates a C account. After the merchant registers successfully with the online payment platform, a B account is generated. The bank channel that the online payment platform is docked to the outside generates a bank account. Accordingly, the three accounts may generate a flow record during the payment transaction, the flow record including a flow in and a flow out. When the account generates funds transaction, if the account is a money feeding party, a money feeding flow is generated; if the account is a cash dispenser, a cash flow is generated.
Specifically, the online payment platform in the embodiment of the invention provides a first payment type and a second payment type;
(1) In the first payment type, the first account completes payment of the second account through account balance; the account balances are in one-to-one correspondence with the first accounts.
Specifically, the first account may be a personal account (C account). The second account may be a merchant account (B account).
In a first payment type, as shown in fig. 3, a personal account (C-account) may make a payment to a merchant account (B-account) using its own account balance.
(2) In the second payment type, the first account finishes payment of the second account through the bank account; the first account corresponds to one or more bank accounts.
Specifically, the second account may be a merchant account (B account). The first account can be a personal account (C account), one or more bank cards can be bound to each personal account, and each bank card binding process is performed, so that a card binding relationship can be established between the personal account and the bank account where the bank card is located. Different banks may have their corresponding bank accounts. As shown in fig. 4, the first account can complete payment to the second account through the bank account with which the binding card relationship exists.
For example, the personal account of the personal user a is A0, the personal user a binds two bank cards B1 and B2 under the name of the personal user a with the personal account A0, wherein the bank card B1 is a bank card issued by a china agricultural bank, and the bank card B2 is a bank card issued by a china construction bank. The personal account A0 establishes a binding relationship with both the chinese agricultural bank and the chinese construction bank. The individual account A0 can pay to the merchant account (B account) through the bank account of the chinese agricultural bank, or can pay to the merchant account (B account) through the bank account of the chinese construction bank.
The invention processes the test data only, and in order to simulate the real transaction, the test account in the test data is the same as the real account in type and is also divided into the three types. The reconciliation rules corresponding to different payment types may be different, and in order to avoid confusion, only test data generated by one payment type may be processed during the execution of steps S101-S103. Of course, in other possible embodiments, test data generated by both payment types may also be processed. Specifically, step S103 may be performed in two steps, as shown in fig. 5, including:
S1031, obtaining payment types.
Specifically, the payment type may be acquired in any link before S1032, and the embodiment of the present invention does not limit the specific acquisition opportunity.
S1032, reconciling accounts participating in the target transaction by using the reconciliation rules corresponding to the payment types.
Considering the situation that the reconciliation rules corresponding to different payment types may be different, the embodiment of the invention provides a reconciliation method based on the payment types, which comprises the following steps:
A1. and if the payment type is the first payment type, performing reconciliation processing on the account participating in the target transaction by using a reconciliation rule corresponding to the first payment type.
A2. And if the payment type is the second payment type, performing reconciliation processing on the account participating in the target transaction by using a reconciliation rule corresponding to the second payment type.
A3. If the payment type is the first payment type and the second payment type, the account participating in the target transaction is subjected to account reconciliation processing by using the reconciliation rules corresponding to the first payment type and the reconciliation rules corresponding to the second payment type.
In actual use, balance payment is of a first payment type, shortcut payment is of a second payment type, and the reconciliation logic of balance payment and shortcut payment is different, so different reconciliation rules should be used.
In order to ensure that the reconciliation rules strictly correspond to the payment types of the test account in use, the test account can be distinguished through the test account in the embodiment of the invention, namely, the test account using balance payment for transaction and the test account using shortcut payment for transaction are different in the test process, and the test account can be rapidly judged to be used in a specific payment type through the test account.
The embodiment of the invention further provides a method for reconciling accounts participating in a target transaction by using a reconciliation rule corresponding to a first payment type, as shown in fig. 6, including:
s10, acquiring a first transaction account set, wherein the first transaction account set comprises a set formed by target accounts, the target accounts comprise second accounts participating in target transactions of a first payment type, and second accounts recharging the first accounts.
In order to facilitate the first account to complete payment to the second account, there may be a case where the second account is pre-charged to the first account, and thus, in the reconciliation rule corresponding to the first payment type, the reconciliation needs to be performed on the second account that is charged to the first account.
Specifically, in the method for reconciling accounts by using the reconciliation rules corresponding to the first payment types provided by the embodiment of the invention, the second account is taken as a reconciliation target, namely, the angle of standing on the second account, so that balance of the second user account after reconciliation is realized.
In one possible embodiment, the reconciliation of the test data generated for the first payment type may be triggered when each first account participating in the transaction of the first payment type has completed its own account balance.
S20, filtering the target data set according to the first transaction account set to obtain first account adjustment basic data; the first reconciliation basis data includes flow records corresponding to all target accounts.
In one possible embodiment, the first account may be recharged to the second account, and the second account may be recharged to the first user while the second account may be left with a flow record on one side of the second account, and the first billing base data may include the flow record generated by the second account.
In another possible implementation manner, to save data volume and reduce system burden, the first account charges the second account with a flow record only on one side of the first account, and not on one side of the second account, and to obtain a complete flow record of the second account, the first reconciliation basis data may include the flow record generated by the second account and the flow record generated by the first account.
S30, reconciling the target account according to the first reconciliation basis data.
Specifically, as shown in fig. 7, the reconciling the target account according to the first reconciliation base data includes:
s301, obtaining a first target account set according to the first account adjustment basic data; the first target account set is a set of target accounts with incomes greater than disbursements.
S302, obtaining a second target account set according to the first account adjustment basic data; the second set of target accounts is a set of target accounts that have a payout greater than a revenue.
In order to finally achieve balance of the second accounts participating in the first payment type transaction, it is necessary to acquire a set of second accounts (first target account set) having a larger charge than the income and a set of second accounts (second target account set) having no income.
S303, transferring accounts from the target accounts in the first target account set to the target accounts in the second target account set so that each target account is restored to a state before the target accounts are not participated in the target transaction.
The first target account set may include a plurality of elements, and the second target account set may include a plurality of elements, so as to implement many-to-many transfer and finally restore each target account to a state before not participating in the target transaction, and as shown in fig. 8, the embodiment of the present invention provides a specific transfer method, including:
S3031, obtaining an intermediary account.
The intermediary account may be a test account.
S3032, each target account in the first target account set transfers the balance of the target account to the intermediary account.
S3033, the intermediary account performs the following operation on each target account in the second target account set: acquiring the balance of the target account; and transferring the account to the target account by the intermediary account, wherein the transfer amount is the absolute value of the balance.
The transfer method takes the intermediary account as the transfer, obtains the sum of the balance of each target account in the first target account set, and charges money to the target account according to the balance of the target accounts in the second target account set by the sum of the balance of each target account in the first target account set and the second target account set.
Further, in order to be compatible with the accounting checking function in the prior art, the embodiment of the invention further includes the following steps:
before the target account is reconciled according to the first reconciliation basis data, the method further comprises: and counting the sum of the balance of all the target accounts.
In order to count the total sum of all the target accounts, the total sum of all the target accounts may be calculated first, and then the total sum of all the target accounts may be counted.
In a test environment, transactions are conducted between test accounts, but should be isolated from real accounts, no transactions should be generated. If the sum of the balance of all the target accounts is nonzero, that is, the balance of the sum of the test accounts cannot be realized, the abnormal situations such as failure in isolation of the test account and the real account are prompted.
And/or, after the target account is reconciled according to the first reconciliation basis data, further comprising: and calculating the sum of the balance of each target account.
After reconciliation, each target account should achieve balance, and if there is a target account with a non-zero balance sum, then an error may be prompted in the reconciliation process.
All or part of the data in the intermediate links and the final results of the above processes can be recorded in a preset database.
The embodiment of the invention further provides a method for reconciling accounts participating in a target transaction by using a reconciliation rule corresponding to a second payment type, as shown in fig. 9, including:
s100, acquiring a second transaction account set, wherein the second transaction account set comprises a set formed by target accounts, and the target accounts are second accounts participating in target transactions of a second payment type.
It should be noted that the data in the real bank account is not changed in the test environment, and the virtual bank account in the test environment does not affect the data of the real bank. For example, the virtual bank account is a China construction Bank CBC, and transactions occurring in the virtual bank account do not affect the data in the real China construction Bank CBC. In the transaction occurrence process of the second payment type, the first account pays to the second account through the bank account which has the binding card relationship with the first account, and the bank account is virtual and does not need to pay to the real bank account, so that the virtual bank account does not need to be pre-charged.
Specifically, in the method for reconciling accounts by using the reconciliation rules corresponding to the second payment types provided by the embodiment of the invention, the second account is taken as a reconciliation target, namely, the angle of standing on the second account, so that balance of the second user account after reconciliation is realized. In the process of realizing the balance of the second user account, the balance of the balance is also realized by the bank account which carries out the second payment type transaction with the second account.
S200, filtering the target data set according to the second transaction account set to obtain second account adjustment basic data; the second reconciliation basis data includes flow records corresponding to all target accounts.
Specifically, the target account and the bank account can be used as a joint primary key, second account adjustment basic data is obtained from the target data set, the second account adjustment basic data comprises flowing water paid to the target account by the bank account, and the flowing water paid to the target account by the bank account is embodied in a flowing water record generated by the second account and/or a flowing water record generated by the bank account.
Notably, the bank account with which the transaction is generated may be different for different target accounts.
Correspondingly, the second reconciliation basis data may be data organized with the target account and the bank account as a joint primary key. For example, the flow record of the second reconciliation base data may be as shown in table 1:
TABLE 1
Target account | Bank account | Flow recording |
Second account A | China construction bank CBC | Running water between A and CBC |
China agriculture bank ABC | Running water between A and ABC | |
Second account B | China agriculture bank ABC | Running water between B and ABC |
ICBC of China business bank | Flowing water between B and ICBC |
S300, reconciling the target account according to the second reconciliation basis data.
Specifically, the reconciling the target accounts according to the second reconciliation basis data includes performing the following operations for each target account, as shown in fig. 10, including:
S3001, obtaining one or more target bank accounts corresponding to the target accounts.
With the data distance in table 1, for the second account a, it corresponds to two target bank accounts, china construction bank CBC and china agriculture bank ABC, respectively.
S3002, calculating a target statistical value for each target bank account, wherein the target statistical value is the balance of the target accounts in the transaction flow of the target accounts and the target bank accounts.
Taking the second account a as an example, in step S3002, two target statistics may be obtained, where the first target statistics is the balance of the second account a during the transaction between the second account a and the chinese construction bank CBC; the second target statistic value is the balance of the second account A in the process of trading the second account A with the China agricultural Bank ABC.
S3003, calculating the total balance of the target account.
The sum of all the target statistical values of the target account is the corresponding balance total difference of the target account.
S3004, reconciling accounts according to the balance total difference.
Specifically, the reconciliation according to the balance total difference is shown in fig. 11, and includes:
and P1, acquiring a transit account.
Specifically, the transit account may be a certain first account.
And P2, transferring the transfer account from the target account to the transfer account, wherein the transfer amount is the balance sum.
And P3, acquiring a transfer target bank account from the target bank account, wherein the target statistic value corresponding to the transfer target bank account is a positive number.
In the process of transaction with the transfer target bank account, the income of the target account is larger than the expenditure, so that the target account should transfer money to the transfer target bank account, and the transferred money is the target statistic value. Thus, P4 is performed.
P4. performing the following operations for each transfer destination bank account: and transferring the transfer account to the transfer target bank account, wherein the transfer amount is a target statistic value corresponding to the transfer target bank account.
The transfer account is a certain first account, and the first account can realize the transfer to the transfer target bank account through the operation mode of the cash register.
Further, in order to be compatible with the accounting checking function in the prior art, the embodiment of the invention further includes the following steps:
before the reconciliation of the target account according to the second reconciliation basis data, further comprising:
counting all the sum of the target account balance; and the target account balance sum value is the balance sum value of the target account in the transaction flow of the target account and each bank account.
In order to count the total sum of all the target accounts, the total sum of all the target accounts may be calculated first, and then the total sum of all the target accounts may be counted.
And/or, after the target account is reconciled according to the second reconciliation basis data, further comprising:
and calculating each single balance sum value corresponding to each target account, wherein the single balance sum value is the balance sum value of the target account in the transaction flow of the target account and a certain bank account.
After reconciliation, each target account should achieve balance, and if there is a target account with a single balance sum value that is non-zero, then an error may be prompted in the reconciliation process.
All or part of the data in the intermediate links and the final results of the above processes can be recorded in a preset database.
In the embodiment of the present invention, as shown in fig. 12, the fund flow for reconciling the test data corresponding to the first payment type exists in the test data generation link corresponding to the first payment type between the first account and the second account, and the fund sources of the first account are all from the pre-charging of the second account. And in the account adjustment process, the funds are closed by adjusting the account of the second account.
As shown in fig. 13, the fund flow for reconciling the test data corresponding to the second payment type is that the bank account pays to the second account in the test data generation link corresponding to the second payment type, and in the reconciliation process, the second account transfers funds to the transfer bank account through the first account, so that the fund closed loop is realized.
The embodiment of the invention further provides an account adjusting method on the basis of being compatible with the accounting checking function in the prior art, so that balance of the second account after account adjustment can be realized, the initial state before test data is restored, and the technical effect that adjacent test processes are completely independent is achieved.
In the actual use process, the embodiment of the invention can be started immediately in response to the preset instruction or the instant triggering instruction, the starting process is more flexible, and the running speed is higher. The embodiment of the invention has wide application prospect, can be used for various online payment platforms for providing payment services, and can be suitable for common test scenes and/or pressure test scenes.
Another embodiment of the present invention provides a test data processing apparatus, as shown in fig. 14, including:
the instruction acquisition module 1 is used for receiving a test data processing instruction, wherein the test data processing instruction comprises a target time interval; the target time interval is a time period for the target transaction to occur;
A target data set obtaining module 2, configured to obtain a target data set from test data according to the target time interval, where an account participating in a target transaction and a flow record corresponding to the account are recorded in the target data set;
and the reconciliation module 3 is used for reconciling the accounts participating in the target transaction according to the target data set so as to restore the accounts participating in the target transaction in the target data set to a state before the accounts do not participate in the target transaction.
Specifically, the reconciliation module 3 includes:
a payment type acquisition unit 31 for acquiring a payment type;
and the reconciliation processing unit 32 is configured to perform reconciliation processing on the account participating in the target transaction using the reconciliation rule corresponding to the payment type.
Specifically, the reconciliation processing unit 32 includes a first reconciliation module and/or a second reconciliation module;
the first account adjusting module is used for adjusting accounts participating in the target transaction by using account adjusting rules corresponding to the first payment type;
and the second account adjusting module is used for adjusting accounts participating in the target transaction by using account adjusting rules corresponding to the second payment type.
The test data processing device and the method embodiments described in the device embodiments of the invention are based on the same inventive concept.
Embodiments of the present invention also provide a storage medium that may be used to store program code for implementing the data processing method in the method embodiment. Alternatively, in this embodiment, the storage medium may be located in at least one network device among a plurality of network devices of the computer network. Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Specifically, fig. 15 is a schematic diagram of a server structure according to an embodiment of the present invention, where the server structure may include the test data processing device described above. The server 800 may vary considerably in configuration or performance and may include one or more central processing units (centralprocessing units, CPUs) 822 (e.g., one or more processors) and memory 832, one or more storage media 830 (e.g., one or more mass storage devices) storing applications 842 or data 844. Wherein the memory 832 and the storage medium 830 may be transitory or persistent. The program stored in the storage medium 830 may include one or more modules (not shown in the drawing), each of which may include a series of instruction operations on a server. Still further, the central processor 822 may be configured to communicate with the storage medium 830 to execute a series of instruction operations in the storage medium 830 on the server 800. The server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input/output interfaces 858, and/or one or more operating systems 841, such as windows server (tm), mac OS XTM, unixTM, linuxTM, freeBSDTM, and the like. The steps performed by the above-described method embodiments may be based on the server structure shown in fig. 15.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.
Claims (11)
1. A test data processing method, characterized in that the test data processing method comprises:
receiving a test data processing instruction, wherein the test data processing instruction comprises a target time interval; the target time interval is a time period for the target transaction to occur, the test data aimed by the test data processing instruction is isolated from real data, and the test data comprises payment behaviors and stream data generated by a test account;
Acquiring a target data set in test data according to the target time interval, wherein an account participating in target transaction and a flow record corresponding to the account are recorded in the target data set;
acquiring a payment type; the payment types include a first payment type and a second payment type; in the first payment type, the first account completes payment of the second account through account balance; the account balances are in one-to-one correspondence with the first accounts; in the second payment type, the first account completes payment of the second account through a bank account; the first account corresponds to one or more bank accounts, and the bank accounts are virtual bank accounts;
according to the target data set, account adjustment processing is carried out on accounts participating in target transaction by using account adjustment rules corresponding to the payment types, so that the accounts participating in the target transaction in the target data set are restored to a state before the accounts do not participate in the target transaction;
the reconciliation processing of the account participating in the target transaction is performed by using the reconciliation rule corresponding to the payment type, including:
if the payment type is the first payment type, using a reconciliation rule corresponding to the first payment type to reconcile accounts participating in the target transaction; the reconciliation processing of the account participating in the target transaction by using the reconciliation rule corresponding to the first payment type comprises the following steps: acquiring a first transaction account set, wherein the first transaction account set comprises a set of target accounts, the target accounts comprise second accounts participating in target transactions of a first payment type, and second accounts recharging the first accounts; filtering the target data set according to the first transaction account set to obtain first reconciliation basis data; the first account adjustment basic data comprise flow records corresponding to all target accounts; according to the first account adjustment basic data, account adjustment is carried out on the target account;
If the payment type is the second payment type, using a reconciliation rule corresponding to the second payment type to reconcile accounts participating in the target transaction; the reconciliation processing of the account participating in the target transaction using the reconciliation rules corresponding to the second payment type comprises: acquiring a second transaction account set, wherein the second transaction account set comprises a set formed by target accounts, and the target accounts are second accounts participating in target transactions of a second payment type; filtering the target data set according to the second transaction account set to obtain second reconciliation basis data; the second account adjustment basic data comprise flow records corresponding to all target accounts; according to the second account adjustment basic data, account adjustment is conducted on the target account;
if the payment types are the first payment type and the second payment type, respectively using the reconciliation rules corresponding to the first payment type and the reconciliation rules corresponding to the second payment type to reconcile accounts participating in the target transaction.
2. The method according to claim 1, characterized in that:
the reconciliation of the target account according to the first reconciliation basis data comprises:
Obtaining a first target account set according to the first account adjustment basic data; the first target account set is a set formed by target accounts with income greater than expenditure;
obtaining a second target account set according to the first account adjustment basic data; the second target account set is a set formed by target accounts with expenditure larger than income;
transferring accounts from the first set of target accounts to the second set of target accounts so that each target account is restored to a state prior to not participating in the target transaction.
3. The method according to claim 2, characterized in that:
the transferring of the target account from the target account in the first target account set to the target account in the second target account set includes:
acquiring an intermediary account;
each target account in the first target account set transfers the balance to the intermediary account;
each target account in the second target account set is subjected to the following operation by the intermediary account: acquiring the balance of the target account; and transferring the account to the target account by the intermediary account, wherein the transfer amount is the absolute value of the balance.
4. The method according to claim 1, characterized in that:
Before the target account is reconciled according to the first reconciliation basis data, the method further comprises:
counting the sum of the balance of all the target accounts;
and/or the number of the groups of groups,
the method further comprises the following steps of:
and calculating the sum of the balance of each target account.
5. The method according to claim 1, characterized in that:
the filtering the target data set to obtain second reconciliation basis data according to the second set of transaction accounts comprises:
and taking the target account and the bank account as a joint primary key, and acquiring second reconciliation basic data from the target data set, wherein the second reconciliation basic data comprises a flow record of transfer of money from the bank account to the target account.
6. The method according to claim 5, wherein:
the reconciliation of the target account according to the second reconciliation basis data comprises:
the following operations are performed for each target account:
acquiring one or more target bank accounts corresponding to the target accounts;
for each target bank account, calculating a target statistical value, wherein the target statistical value is the balance of the target account obtained in the transaction flow records of the target account and the target bank account;
Calculating the total balance of the target account according to each target statistic value;
and adjusting accounts according to the balance total difference.
7. The method according to claim 6, wherein:
the reconciliation according to the balance total difference comprises:
acquiring a transit account;
transferring account transfer to the transfer account by a target account, wherein the transfer amount is the total balance;
acquiring a transfer target bank account from a target bank account, wherein a target statistical value corresponding to the transfer target bank account is a positive number;
the following operations are performed for each transfer destination bank account:
and transferring the transfer account to the transfer target bank account, wherein the transfer amount is a target statistic value corresponding to the transfer target bank account.
8. The method according to claim 1, characterized in that:
before the reconciliation of the target account according to the second reconciliation basis data, further comprising:
counting all the sum of the target account balance; the target account balance sum value is obtained from transaction flow records of the target account and each bank account;
and/or the number of the groups of groups,
and after the target account is reconciled according to the second reconciliation basis data, the method further comprises the following steps:
And calculating each single balance sum value corresponding to each target account, wherein the single balance sum value is the balance sum value of the target account obtained in the transaction flow record of the target account and a certain bank account.
9. A test data processing apparatus, the apparatus comprising:
the instruction acquisition module is used for receiving a test data processing instruction, wherein the test data processing instruction comprises a target time interval; the target time interval is a time period for the target transaction to occur, the test data aimed by the test data processing instruction is isolated from real data, and the test data comprises payment behaviors and stream data generated by a test account;
the target data set acquisition module is used for acquiring a target data set in the test data according to the target time interval, wherein an account participating in target transaction and a flow record corresponding to the account are recorded in the target data set;
the account adjusting module is used for acquiring payment types; the payment types include a first payment type and a second payment type; in the first payment type, the first account completes payment of the second account through account balance; the account balances are in one-to-one correspondence with the first accounts; in the second payment type, the first account completes payment of the second account through a bank account; the first account corresponds to one or more bank accounts, and the bank accounts are virtual bank accounts; according to the target data set, account adjustment processing is carried out on accounts participating in target transaction by using account adjustment rules corresponding to the payment types, so that the accounts participating in the target transaction in the target data set are restored to a state before the accounts do not participate in the target transaction;
The reconciliation processing for the account participating in the target transaction by using the reconciliation rule corresponding to the payment type comprises the following steps:
if the payment type is the first payment type, using a reconciliation rule corresponding to the first payment type to reconcile accounts participating in the target transaction; the reconciliation processing of the account participating in the target transaction by using the reconciliation rule corresponding to the first payment type comprises the following steps: acquiring a first transaction account set, wherein the first transaction account set comprises a set of target accounts, the target accounts comprise second accounts participating in target transactions of a first payment type, and second accounts recharging the first accounts; filtering the target data set according to the first transaction account set to obtain first reconciliation basis data; the first account adjustment basic data comprise flow records corresponding to all target accounts; according to the first account adjustment basic data, account adjustment is carried out on the target account;
if the payment type is the second payment type, using a reconciliation rule corresponding to the second payment type to reconcile accounts participating in the target transaction; the reconciliation processing of the account participating in the target transaction using the reconciliation rules corresponding to the second payment type comprises: acquiring a second transaction account set, wherein the second transaction account set comprises a set formed by target accounts, and the target accounts are second accounts participating in target transactions of a second payment type; filtering the target data set according to the second transaction account set to obtain second reconciliation basis data; the second account adjustment basic data comprise flow records corresponding to all target accounts; according to the second account adjustment basic data, account adjustment is conducted on the target account;
If the payment types are the first payment type and the second payment type, respectively using the reconciliation rules corresponding to the first payment type and the reconciliation rules corresponding to the second payment type to reconcile accounts participating in the target transaction.
10. A server comprising the test data processing device of claim 9.
11. A storage medium storing program code for implementing the test data processing method of any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810159832.6A CN110196802B (en) | 2018-02-26 | 2018-02-26 | Test data processing method, device and server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810159832.6A CN110196802B (en) | 2018-02-26 | 2018-02-26 | Test data processing method, device and server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110196802A CN110196802A (en) | 2019-09-03 |
CN110196802B true CN110196802B (en) | 2024-01-12 |
Family
ID=67751235
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810159832.6A Active CN110196802B (en) | 2018-02-26 | 2018-02-26 | Test data processing method, device and server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110196802B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111444090B (en) * | 2020-03-24 | 2024-04-26 | 腾讯科技(深圳)有限公司 | Contract testing method and device in blockchain, electronic equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6129271A (en) * | 1998-04-30 | 2000-10-10 | Lexcel Solutions, Inc. | Electronic funds transfer network test system |
WO2005116871A1 (en) * | 2004-05-28 | 2005-12-08 | Pattern Recognition Systems As | Method and apparatus for tuning database configuration parameters usnig multivariate analysis |
CN101789967A (en) * | 2010-01-12 | 2010-07-28 | 重庆大学 | Remote test service system based on electronic commerce and use method thereof |
CN104038605A (en) * | 2014-06-04 | 2014-09-10 | 福建升腾资讯有限公司 | Phone point of sale (POS) payment terminal transaction testing method |
CN106487603A (en) * | 2015-08-26 | 2017-03-08 | 阿里巴巴集团控股有限公司 | A kind of response test method and device |
CN107179986A (en) * | 2016-03-10 | 2017-09-19 | 阿里巴巴集团控股有限公司 | The method for testing pressure and device of operation system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090048954A1 (en) * | 2007-08-13 | 2009-02-19 | Canopy Financial | Sub-accounting for an omnibus account |
-
2018
- 2018-02-26 CN CN201810159832.6A patent/CN110196802B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6129271A (en) * | 1998-04-30 | 2000-10-10 | Lexcel Solutions, Inc. | Electronic funds transfer network test system |
WO2005116871A1 (en) * | 2004-05-28 | 2005-12-08 | Pattern Recognition Systems As | Method and apparatus for tuning database configuration parameters usnig multivariate analysis |
CN101789967A (en) * | 2010-01-12 | 2010-07-28 | 重庆大学 | Remote test service system based on electronic commerce and use method thereof |
CN104038605A (en) * | 2014-06-04 | 2014-09-10 | 福建升腾资讯有限公司 | Phone point of sale (POS) payment terminal transaction testing method |
CN106487603A (en) * | 2015-08-26 | 2017-03-08 | 阿里巴巴集团控股有限公司 | A kind of response test method and device |
CN107179986A (en) * | 2016-03-10 | 2017-09-19 | 阿里巴巴集团控股有限公司 | The method for testing pressure and device of operation system |
Also Published As
Publication number | Publication date |
---|---|
CN110196802A (en) | 2019-09-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2002236800A (en) | Device/method for aggregating transaction information on financial transaction, recording medium with program for carrying out the device stored thereon and recording medium with program for carrying out the method stored thereon | |
CN106910129B (en) | Asset data processing method, client and server | |
WO2013017695A1 (en) | Method, system and process for centralized management and control of a budget and electronic mass distribution of funds | |
CN110827138A (en) | Push information determining method and device | |
CN109191304B (en) | Transaction data rolling stock processing method, system, computer equipment and storage medium | |
CN101221680A (en) | System and method for implementing minimum and maximum amount repayment of individual loan | |
CN112347110B (en) | Data difference determining method, device, equipment and storage medium | |
CN110196802B (en) | Test data processing method, device and server | |
CN113191887A (en) | Abnormal account early warning method and device | |
CN109993653A (en) | A kind of method of net loan system financial settlement loan fund balance | |
CN109903145A (en) | Verification of data method, apparatus, equipment and system | |
CN107798602A (en) | A kind of management method and system of the common reserve fund discount loan | |
US20180330353A1 (en) | Systems and Methods for Assessing Fees in Connection With Payment Account Transactions | |
CN109255717A (en) | A kind of fund divides account method and device | |
US20220114660A1 (en) | Methods and systems for rendering a line of credit micro loan | |
CN115082234A (en) | In-system reconciliation method and system based on cash in and out mark | |
CN114971830A (en) | Method, device, equipment and medium for managing amortization business | |
CN107945004A (en) | Expense accumulates collection methods and device | |
CN111915421B (en) | Exchange processing method and system for internal transaction of banking system | |
CN111583030A (en) | Payment routing method and device | |
CN111145013A (en) | Repayment data adjusting method and device | |
KR20130062445A (en) | Reward services based on the credit cards usage level to provide a reward system and its operating methods | |
CN117873906B (en) | Method and device for testing prize amount distribution in transaction system | |
CN116843459A (en) | Data auditing method, electronic equipment, storage medium and product | |
JP2002207952A (en) | System and method for suspense receipt management |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |