Data processing method and device based on financial core online transaction scenario
By simulating the data processing method of the core online trading scenarios of finance in database benchmark tests, the problem that existing technology is difficult to simulate the trading scenarios of the financial industry is solved, and effective evaluation of database performance and support for financial industry transaction services are achieved.
Patent Information
- Application Number
- CN202110493684.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-07
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-05-07
AI Technical Summary
The existing database benchmark test solution is difficult to simulate the financial core online trading scenarios in the financial industry, cannot effectively reflect the characteristics of the financial core system accessing the database, and is difficult to meet the financial industry's needs for database product selection and evaluation.
Provide a data processing method and device based on the financial core online transaction scenario. By obtaining transaction data, each thread in at least two threads performs preset online transaction processing, including account opening, deposit, withdrawal, transfer, and information query. , detailed query and payment, obtain response time and transaction number, and periodically obtain database performance statistical indicators to determine the performance support of the database in the financial core online trading scenario.
This method and device can better simulate the financial core online transaction scenario, reflect the business load characteristics of the financial core accounting system, improve the service support performance of online transactions in the financial industry, and meet the financial industry's evaluation needs for database products.
Smart Images

Figure CN113159967B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of database testing technology, and in particular to a data processing method and device based on a financial core online transaction scenario. Background Art
[0002] In the field of database benchmarking, it is necessary to simulate business loads to perform transaction processing on the data stored in the database in order to evaluate the performance (such as transaction throughput, response time, etc.) and capacity (such as concurrency, storage capacity, etc.) that the database product can support. Currently, commonly used database benchmarking solutions include the Sysbench test that uses a random read and write transaction model and the TPC-C test based on a warehouse inventory model. The Sysbench tool is an open source benchmarking tool that can perform performance benchmarks in CPU / memory / threads / IO / database. TPC-C is a benchmark for database online transaction processing performance released by the Transaction Processing Performance Council (TPC).
[0003] Compared with the requirements of the financial industry for database products, the transaction process of data processing in existing technical solutions is relatively simple, and cannot well simulate the database workload in the financial industry's core online transaction scenarios. It is difficult to reflect the characteristics of a financial core system accessing the database, and it is difficult to meet the financial industry's needs for database product selection and evaluation. Summary of the invention
[0004] In view of the problems in the prior art, the present invention provides a data processing method and device based on a financial core online transaction scenario, which specifically includes the following technical solutions:
[0005] In a first aspect, the present invention provides a data processing method based on a financial core online transaction scenario, comprising:
[0006] Obtain transaction data based on core financial online transaction scenarios;
[0007] Each of the at least two threads executes a preset online transaction process based on the transaction data;
[0008] Get the response time and number of completed transactions for each transaction in online transaction processing;
[0009] The transaction data is modified based on the response time of each transaction and the number of transactions completed.
[0010] The online transaction processing includes: account opening, account deposit, account withdrawal, account transfer, account information query, account detail query and account payment.
[0011] Each of the at least two threads executes a preset online transaction process based on the transaction data, including:
[0012] Mix and execute account opening, account deposit, account withdrawal, account transfer, account information inquiry, account detail inquiry and account payment according to the preset ratio;
[0013] Schedule a preset number of payer accounts to make account payments to the same payee account.
[0014] After modifying the transaction data based on the response time and the number of completed transactions of each transaction, the method further includes:
[0015] Periodically obtain database performance statistics under online transaction processing;
[0016] The performance statistical indicators are used to determine the supporting performance of the database in the financial core online transaction scenario.
[0017] The performance statistical indicators include: transaction response time and the number of completed transactions.
[0018] In a second aspect, the present invention provides a data processing device based on a financial core online transaction scenario, comprising:
[0019] The acquisition module is used to obtain transaction data based on the core financial online transaction scenario;
[0020] An online transaction processing module, configured for each of at least two threads to perform a preset online transaction processing based on the transaction data;
[0021] Statistics module, used to obtain the response time and number of completed transactions of each transaction in online transaction processing;
[0022] A processing module is used to modify the transaction data based on the response time of each transaction and the number of completed transactions.
[0023] The online transaction processing includes: account opening, account deposit, account withdrawal, account transfer, account information query, account detail query and account payment.
[0024] Wherein, the online transaction processing module includes:
[0025] An online transaction processing unit for mixed execution of account opening, account deposit, account withdrawal, account transfer, account information inquiry, account detail inquiry and account payment in a preset ratio;
[0026] The hot account unit is used to schedule a preset number of payer accounts to make account payments to the same payee account.
[0027] Among them, it also includes:
[0028] The indicator module is used to periodically obtain the performance statistics of the database under online transaction processing;
[0029] The performance statistical indicators are used to determine the supporting performance of the database in the financial core online transaction scenario.
[0030] The performance statistical indicators include: transaction response time and the number of completed transactions.
[0031] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data processing method based on a financial core online transaction scenario when executing the program.
[0032] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the data processing method based on a financial core online transaction scenario.
[0033] It can be seen from the above technical scheme that the present invention provides a data processing method and device based on a financial core online transaction scenario, by obtaining transaction data based on a financial core online transaction scenario; each of at least two threads performs a preset online transaction process based on the transaction data; obtaining the response time and the number of completed transactions of each transaction in the online transaction process; and modifying the transaction data based on the response time and the number of completed transactions of each transaction. The transaction data of the financial core online transaction scenario can be processed, thereby improving the service support performance of online transactions in the financial industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 It is a first flow chart of a data processing method based on a financial core online transaction scenario in an embodiment of the present invention.
[0036] Figure 2 It is a second flow chart of the data processing method based on the financial core online transaction scenario in an embodiment of the present invention.
[0037] Figure 3It is a structural schematic diagram of a data processing device based on a financial core online transaction scenario in an embodiment of the present invention.
[0038] Figure 4 Schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] The present invention provides an embodiment of a data processing method based on a financial core online transaction scenario, see Figure 1 The data processing method based on the financial core online transaction scenario specifically includes the following contents:
[0041] S101: Acquire transaction data based on a core financial online transaction scenario;
[0042] S102: Each of the at least two threads executes a preset online transaction process based on the transaction data;
[0043] In this step, the online transaction processing includes: account opening, account deposit, account withdrawal, account transfer, account information query, account detail query and account payment. Further, each transaction processing in the online transaction processing is classified according to a preset ratio.
[0044] S103: Obtaining the response time and number of completed transactions of each transaction in the online transaction processing;
[0045] S104: Modify the transaction data based on the response time of each transaction and the number of completed transactions.
[0046] In this embodiment, transaction data based on a core financial online transaction scenario is obtained, and the obtained transaction data is processed.
[0047] Pre-configure the parameters for each trade execution.
[0048] For the convenience of expression, this article uses the following variable names to represent system parameters:
[0049]
[0050] Start i_threads threads to simulate concurrent access to the financial core accounting system. Each thread has a corresponding service teller and service outlet organization.
[0051] In this embodiment, each of the at least two threads performs a preset online transaction process based on the transaction data, including:
[0052] Mix and execute account opening, account deposit, account withdrawal, account transfer, account information inquiry, account detail inquiry and account payment according to the preset ratio;
[0053] Each thread executes the financial core online transaction processing procedures of "account opening", "account deposit", "account withdrawal", "account transfer", "account information query", "account detail query", and "account payment" in a mixed manner in a certain proportion. The proportion of each transaction can be configured through parameters. For example, according to the daily activity of each online transaction in the financial core transaction system in real life, a typical proportion relationship is provided in this embodiment as follows:
[0054] Transaction Code Transaction scenario Chinese name Transaction scenario English name Transaction ratio 1 Account Opening ACCOPEN 1% 2 Account deposit ACCDEPOSIT 5% 3 Account withdrawal ACCDRAW 5% 4 Account transfer ACCTRANSFER 60% 5 Account information inquiry ACCQUERY 5% 6 Account details inquiry ACCDETQUERY 4% 7 Account payment ACCPAY 20%
[0055] In this embodiment, each of the at least two threads executes a preset online transaction process based on the transaction data, and further includes: scheduling a preset number of payer accounts to make account payments to the same payee account.
[0056] For example: Scheduling controls 10% of account payment transactions to pay to the same recipient account.
[0057] Statistics on the response time of each transaction and the number of completed transactions.
[0058] Every i_interval seconds, calculate and output the system's TPS (Transactions PerSecond), avg latency (average transaction response time), min latency (minimum transaction response time), max latency (maximum transaction response time), and percentile latency (percentile transaction response time) performance indicators within the i_interval time period.
[0059] After executing i_runtime seconds, stop initiating new transactions.
[0060] It can be seen from the above technical scheme that the present invention provides a data processing method based on a financial core online transaction scenario, by obtaining transaction data based on a financial core online transaction scenario; each of at least two threads performs preset online transaction processing based on the transaction data; obtains the response time and the number of completed transactions of each transaction in the online transaction processing; and modifies the transaction data based on the response time and the number of completed transactions of each transaction. It is capable of processing the transaction data of the financial core online transaction scenario, thereby improving the service support performance of online transactions in the financial industry. It fully reflects the business load characteristics of online transactions accessing the database of the financial core account system, covers deposits, withdrawals, transfers, and inquiries of financial core online transaction scenarios, and can better test the service support capabilities of database products for online transactions in the financial industry. The hot account scenario is simulated by designing a certain proportion of account payment transactions to pay the same account.
[0061] In one embodiment of the present invention, see Figure 2 , after step S103 in the above embodiment, further comprising:
[0062] S105: periodically obtaining performance statistical indicators of the database under online transaction processing;
[0063] The performance statistics indicators are used to determine the supporting performance of the database in the financial core online transaction scenario. The performance statistics indicators include: transaction response time and the number of completed transactions.
[0064] In this implementation, after all transactions are executed, the total TPS and avg / min / max / percentile latency performance indicators during the entire i_runtime execution period are calculated based on the performance indicators of TPS (Transactions Per Second), avg latency (average transaction response time), min latency (minimum transaction response time), maxlatency (maximum transaction response time), and percentile latency (percentile transaction response time).
[0065] This embodiment can process transaction data of core financial online transaction scenarios, thereby improving the service support performance of online transactions in the financial industry.
[0066] This embodiment provides a specific implementation method of core transaction processing, which specifically includes:
[0067] Account withdrawal transaction (ACCDRAW):
[0068] (1) Get the system date and time and set them as the transaction date v_workdate.
[0069] (2) Obtain the transaction channel's unique business ID v_seq from the global unique ID server.
[0070] (3) Set the current thread’s execution teller number v_teller and execution institution number v_institution information.
[0071] (4) Set the business information such as the account number v_account, currency v_currency, and amount v_amount.
[0072] (5) Check whether the organization exists. The sample SQL is as follows:
[0073]
[0074] Reports an error if the record does not exist.
[0075] (6) Check if the teller exists. The sample SQL is as follows:
[0076]
[0077] Reports an error if the record does not exist.
[0078] (7) Check whether the currency is supported. The sample SQL is as follows:
[0079]
[0080] Reports an error if the record does not exist.
[0081] (8) Business anti-duplicate control. The example SQL is as follows:
[0082]
[0083] If the record already exists, an error message will be displayed: The business was initiated repeatedly.
[0084] (9) Query the account information table. The sample SQL is as follows:
[0085]
[0086] If the account does not exist, an error message will be displayed indicating that the account does not exist.
[0087] If the account exists but is in an abnormal state, an error message will be displayed indicating that the account is in an abnormal state.
[0088] (10) Query the account details serial number v_seq_account. The sample SQL is as follows:
[0089]
[0090] Assign the query result to the account details serial number v_seq_account. Then update the serial number. The example SQL is as follows:
[0091]
[0092] Query the interest accrual details serial number v_seq_interest_accrual. Then update the serial number. The example SQL is as follows:
[0093]
[0094] Assign the query result to the interest accrual details serial number v_seq_interest_accrual.
[0095]
[0096]
[0097] (11) Query the account balance table. The example SQL is as follows:
[0098]
[0099] If the record does not exist, report an error.
[0100] If the record exists, obtain the current account balance and assign it to v_balance. Then judge whether the account balance is insufficient. If v_balance < v_amount, report an error of insufficient balance.
[0101] (12) Register the account interest accrual details table:
[0102] If the last trading date field5 of the account balance table is not equal to the current trading date v_workdate, register an interest accrual detail. The example SQL is as follows:
[0103]
[0104] Account balance update setting:
[0105] v_balance_old = v_balance.
[0106] v_balance = v_balance - v_amount. / / Current balance -= Current transaction amount.
[0107] If the last trading date FIELD5 of the account balance table is not equal to the current trading date v_workdate, the current balance needs to be updated to the previous period balance field.
[0108]
[0109]
[0110] If the last transaction date FIELD5 of the account balance table is equal to the current transaction date v_workdate, the previous period balance remains unchanged; the current balance is updated to the current balance plus the business processing amount:
[0111]
[0112] (13) Insert the account details table. The sample SQL is as follows:
[0113]
[0114] (14) Insert a record into the business register. If the transaction succeeds, the record is inserted successfully. If the transaction fails, a failure record is also inserted. The sample SQL is as follows:
[0115]
[0116]
[0117] Account transfer transaction (ACCTRANSFER):
[0118] (1) Data initialization and check processing
[0119] (1.1) Get the system date as the transaction date v_workdate;
[0120] (1.2) Set the unique service number v_seq;
[0121] (1.3) Set the business information including executing institution v_institution, executing teller v_teller, payer account v_account_out, recipient account v_account_in, transaction currency v_currency, and transaction amount v_amount.
[0122] (1.4) Check whether the organization exists. The sample SQL is as follows:
[0123]
[0124] Reports an error if the record does not exist.
[0125] (1.5) Check if the teller exists. The sample SQL is as follows:
[0126]
[0127] Reports an error if the record does not exist.
[0128] (1.6) Check whether the currency is supported. The sample SQL is as follows:
[0129]
[0130] Reports an error if the record does not exist.
[0131] (1.7) Business anti-duplicate control. The sample SQL is as follows:
[0132]
[0133] If the record already exists, an error message will be displayed: The business was initiated repeatedly.
[0134] (2) Payment:
[0135] (2.1) Query account information table:
[0136]
[0137] If the account does not exist, an error message will be displayed indicating that the account does not exist.
[0138] If the account exists but is in an abnormal state, an error message will be displayed indicating that the account is in an abnormal state.
[0139] (2.2) Query the account details serial number v_seq_account_out. The sample SQL is as follows:
[0140]
[0141] Assign the query result to the account number v_seq_account_out. Then update the account number table. The sample SQL is as follows:
[0142]
[0143] Query the interest accrual detail sequence number v_seq_interest_accrual_out. The sample SQL is as follows:
[0144]
[0145] Assign the query result to the interest calculation detail serial number v_seq_interest_accrual_out. Then update the account serial number table. The sample SQL is as follows:
[0146]
[0147] (2.3) Query the account balance table. The sample SQL is as follows:
[0148]
[0149] If the record does not exist, an error is reported.
[0150] If the record exists, the current balance of the account is obtained and assigned to v_balance_out. If the payer's account balance v_balance_out < the transaction amount v_amount, an error message is displayed indicating insufficient balance.
[0151] (2.4) Interest Calculation Details of Registered Accounts:
[0152] If the last transaction date field5 of the payer's account balance table is not equal to the current transaction date v_workdate, then an interest calculation detail is recorded:
[0153]
[0154]
[0155] (2.5) Payer account balance update settings:
[0156] v_balance_out_old=v_balance_out;
[0157] v_balance_out=v_balance-v_amount;
[0158] If the last transaction date FIELD5 of the payer's account balance table is not equal to the transaction date v_workdate, the current balance FIELD3 needs to be updated to the previous balance FIELD4. The sample SQL is as follows:
[0159]
[0160] If the last transaction date FIELD5 of the payer's account balance table TABLE4 is equal to the transaction date v_workdate, the previous balance FIELD4 remains unchanged and the current balance is updated. The sample SQL is as follows:
[0161]
[0162] (2.6) Insert the payer record into the account details table. The sample SQL is as follows:
[0163]
[0164]
[0165] The payer is lending money to the bank. The payee is loaning money from the bank.
[0166] (3) Processing by the recipient:
[0167] (3.1) Query account information table:
[0168]
[0169] If the account does not exist, an error message will be displayed indicating that the account does not exist.
[0170] If the account exists but is in an abnormal state, an error message will be displayed indicating that the account is in an abnormal state.
[0171] (3.2) Query the account number v_seq_account_in. The sample SQL is as follows:
[0172]
[0173] Assign the query result to the account number v_seq_account_in. Then update the account number table. The sample SQL is as follows:
[0174]
[0175] Query the interest accrual details sequence number v_seq_interest_accrual_in:
[0176]
[0177] Assign the query result to the interest calculation detail serial number v_seq_interest_accrual_in. Then update the account serial number table. The sample SQL is as follows:
[0178]
[0179] (3.3) Query the account balance table. The sample SQL is as follows:
[0180]
[0181] If the record does not exist, an error is reported.
[0182] If the record exists, get the current balance of the account and assign it to v_balance_in.
[0183] (3.4) Interest Calculation Details of Registered Accounts:
[0184] If the last transaction date field5 of the recipient's account balance sheet is not equal to the current transaction date v_workdate, then an interest calculation detail is recorded:
[0185]
[0186] (3.5) Account balance update setting variables:
[0187] v_balance_in_old=v_balance_in;
[0188] v_balance_in=v_balance+v_amount;
[0189] If the last transaction date FIELD5 of the payer's account balance table TABLE4 is not equal to the transaction date v_workdate, the current balance FIELD3 needs to be updated to the previous balance FIELD4.
[0190]
[0191] If the last transaction date FIELD5 of the payer's account balance table TABLE4 is equal to the transaction date v_workdate, the previous balance FIELD4 remains unchanged and is the current balance. The sample SQL is as follows:
[0192]
[0193] (3.6) Insert recipient records into the account statement:
[0194]
[0195] The recipient takes a loan from a bank.
[0196] (4) Insert into the business register. If the operation succeeds, the registration succeeds. If it fails, the registration fails. The sample SQL is as follows:
[0197]
[0198]
[0199] The currency and amount of the borrower and lender must be the same.
[0200] Account information query transaction (ACCQUERY):
[0201] (1) Data initialization and check processing:
[0202] (1.1) Get the system date as the transaction date v_workdate;
[0203] (1.2) Generate a unique business number v_seq;
[0204] (1.3) Set up the execution structure v_institution, execution teller v_teller, business account v_account, and business currency v_currency business information.
[0205] (1.4) Check whether the organization exists. The sample SQL is as follows:
[0206]
[0207] Reports an error if the record does not exist.
[0208] (1.5) Check if the teller exists. The sample SQL is as follows:
[0209]
[0210] Reports an error if the record does not exist.
[0211] (2) Insert a record in the business register, with the business type being query:
[0212]
[0213]
[0214] Query transactions can be inserted into the business register first.
[0215] (3) Query account information table:
[0216]
[0217] If the account does not exist, an error message will be displayed indicating that the account does not exist.
[0218] If the account exists, the queried account information will be returned.
[0219] (4) Query account balance table:
[0220]
[0221] Account details query (ACCDETQUERY):
[0222] (1) Data initialization and check processing:
[0223] (1.1) Get the system date as the transaction date v_workdate;
[0224] (1.2) Generate a unique business number v_seq;
[0225] (1.3) Set the executing institution v_institution, executing teller v_teller, business account v_account, business currency, start date v_date_start, and end date v_date_end.
[0226] (1.4) Set the query page sequence number v_seq_query=1.
[0227] Query 5 pages at a time, and the maximum page number of the previous query is used for the next page.
[0228] (1.5) Check whether the organization exists. The sample SQL is as follows:
[0229]
[0230] Reports an error if the record does not exist.
[0231] (1.6) Check if the teller exists. The sample SQL is as follows:
[0232]
[0233] Reports an error if the record does not exist.
[0234] (2) Insert a record into the business register, and the business type is query:
[0235]
[0236]
[0237] (3) Query account details:
[0238]
[0239] Return the queried detailed records.
[0240] Account payment transaction (ACCPAY):
[0241] Account payment transactions simulate online payment scenarios, and certain transaction flows can be set as hot transactions, such as 10% of account payment transactions are paid to the same account. The specific processing flow of account payment transactions is as follows:
[0242] (1) Data initialization and check processing:
[0243] (1.1) Get the system date as the transaction date v_workdate;
[0244] (1.2) Set the unique service number v_seq;
[0245] (1.3) Set the business information including executing institution v_institution, executing teller v_teller, payer account v_account_out, recipient account v_account_in, transaction currency v_currency, and transaction amount v_amount.
[0246] (1.4) Check whether the organization exists. The sample SQL is as follows:
[0247]
[0248] Reports an error if the record does not exist.
[0249] (1.5) Check if the teller exists. The sample SQL is as follows:
[0250]
[0251] Reports an error if the record does not exist.
[0252] (1.6) Check whether the currency is supported. The sample SQL is as follows:
[0253]
[0254] Reports an error if the record does not exist.
[0255] (1.7) Business anti-duplicate control. The sample SQL is as follows:
[0256]
[0257] If the record already exists, an error message will be displayed: The business was initiated repeatedly.
[0258] (2) Payment:
[0259] (2.1) Query account information table:
[0260]
[0261] If the account does not exist, an error message will be displayed indicating that the account does not exist.
[0262] If the account exists but is in an abnormal state, an error message will be displayed indicating that the account is in an abnormal state.
[0263] (2.2) Query the account details serial number v_seq_account_out. The sample SQL is as follows:
[0264]
[0265] Assign the query result to the account number v_seq_account_out. Then update the account number table. The sample SQL is as follows:
[0266]
[0267] Query the interest accrual details sequence number v_seq_interest_accrual_out:
[0268]
[0269]
[0270] Assign the query result to the interest accrual detail serial number v_seq_interest_accrual_out. Then update the interest accrual detail serial number in the account serial number table. The sample SQL is as follows:
[0271]
[0272] (2.3) Query the account balance table. The sample SQL is as follows:
[0273]
[0274] If the record does not exist, an error is reported.
[0275] If the record exists, the current balance of the account is obtained and assigned to v_balance_out. If the payer's account balance v_balance_out < the transaction amount v_amount, an error message is displayed indicating insufficient balance.
[0276] (2.4) Interest Calculation Details of Registered Accounts:
[0277] If the last transaction date field5 of the payer's account balance table is not equal to the current transaction date v_workdate, then an interest calculation detail is recorded:
[0278]
[0279]
[0280] (2.5) Payer account balance update:
[0281] v_balance_out_old=v_balance_out;
[0282] v_balance_out -= v_amount;
[0283] If the last transaction date FIELD5 of the payer's account balance table is not equal to the transaction date v_workdate, the current balance FIELD3 needs to be updated to the previous balance FIELD4.
[0284]
[0285] If the last transaction date FIELD5 of the payer's account balance table TABLE4 is equal to the transaction date v_workdate, the previous balance FIELD4 remains unchanged and the current balance is updated. The sample SQL is as follows:
[0286]
[0287] (2.6) Insert the payer record into the account statement:
[0288]
[0289] The payer is lending money to the bank. The payee is loaning money from the bank.
[0290] (3) Processing by the recipient:
[0291] (3.1) Query account information table:
[0292]
[0293] If the account does not exist, an error message will be displayed indicating that the account does not exist.
[0294] If the account exists but is in an abnormal state, an error message will be displayed indicating that the account is in an abnormal state.
[0295] (3.2) Query the account number v_seq_account_in. The sample SQL is as follows:
[0296]
[0297] Assign the query result to the account detail serial number v_seq_account_in. Then update the account detail serial number in the account serial number table. The sample SQL is as follows:
[0298]
[0299] Query the interest accrual details sequence number v_seq_interest_accrual_in:
[0300]
[0301] Assign the query result to the interest-bearing detail serial number v_seq_interest_accrual_in. Then update the interest-bearing detail serial number in the account serial number table. The sample SQL is as follows:
[0302]
[0303] (3.3) Query the account balance table. The sample SQL is as follows:
[0304]
[0305] If the record does not exist, an error is reported.
[0306] If the record exists, get the current balance of the account and assign it to v_balance_in.
[0307] (3.4) Interest Calculation Details of Registered Accounts:
[0308] If the last transaction date field5 of the recipient's account balance sheet is not equal to the current transaction date v_workdate, then an interest calculation detail is recorded:
[0309]
[0310] (3.5) Account balance update:
[0311] v_balance_in_old=v_balance_in;
[0312] v_balance_in+=v_amount;
[0313] If the last transaction date FIELD5 of the payer's account balance table is not equal to the transaction date v_workdate, the current balance FIELD3 needs to be updated to the previous balance FIELD4.
[0314]
[0315] If the last transaction date FIELD5 of the payer's account balance table is equal to the transaction date v_workdate, the previous balance FIELD4 remains unchanged and is the current balance. The sample SQL is as follows:
[0316]
[0317] (3.6) Insert recipient records into the account statement:
[0318]
[0319]
[0320] The recipient takes a loan from a bank.
[0321] (4) Insert into the business register. If the operation succeeds, the registration succeeds. If it fails, the registration fails. The sample SQL is as follows:
[0322]
[0323] The currency and amount of the borrower and lender must be the same.
[0324] It should be noted that, in this embodiment, the i_ prefixed variables represent system input parameters, and the v_ prefixed variables represent variables involved in the processing process.
[0325] In this embodiment, the specific formats of the serial number table, account details table, account serial number table and business registration book in the above embodiment are provided:
[0326] Serial number table:
[0327] (1) Field definition:
[0328] English name Chinese name Data Types Notes FIELD1 Serial number type UNSIGNED INT(3) 1-Account number FIELD2 Serial number UNSIGNED BIGINT(19) FIELD3 Last adjustment date DATE Dates are stored in the format YYYY-MM-DD
[0329] (2) Index definition:
[0330] Index Name Index fields property IDX1 FIELD1 UNIQUE
[0331] Account Details Table: (1) Field Definition:
[0332] English name Chinese name Data Types Notes FIELD1 account UNSIGNED BIGINT(19) FIELD2 Currency UNSIGNED INT(3) FIELD3 Business unique number VARCHAR(30) The unique number sent by the specific business FIELD4 Actuator UNSIGNED BIGINT(10) FIELD5 Executive Teller UNSIGNED BIGINT(11) FIELD6 Detailed serial number UNSIGNED BIGINT(17) FIELD7 Transaction Date DATE YYYY-MM-DD FIELD8 Transaction Code UNSIGNED INT(5) FIELD9 Cash sign UNSIGNED INT(1) 1-Cash 2-Transfer FIELD10 Loan Sign UNSIGNED INT(1) 1-Debit 2-Loan FIELD11 Amount BIGINT(17) FIELD12 Balance BIGINT(17) FIELD13 summary VARCHAR(180) FIELD14 Timestamp TIMESTAMP(6)
[0333] (2) Index definition:
[0334] Index Name Index fields property IDX1 FIELD1+FIELD2+FIELD6 UNIQUE IDX2 FIELD7 NORMAL
[0335] Account number table: (1) Field definition:
[0336]
[0337] (2) Index definition:
[0338] Index Name Index fields property IDX1 FIELD1+FIELD2+FIELD3 UNIQUE
[0339] Business register:
[0340] (1) Field definition:
[0341]
[0342] (2) Index definition:
[0343] Index Name Index fields property IDX1 FIELD1+FIELD2 UNIQUE
[0344] (3) Table description: Amounts are all integer types, and the unit is the smallest unit of the specified currency. For example, the amount unit of a RMB account is 1 cent.
[0345] The last update date of FIELD18 may be different from the transaction date of FIELD1, for example, a day-cut transaction is completed the next day.
[0346] It should be noted that one type of transaction corresponds to one internal account, for example, cash transactions correspond to one internal account, and interest settlement also corresponds to one internal account. There will only be one record in one batch, and each internal account has only one processing direction, so there will be no unique key conflict due to different processing directions.
[0347] The data constraints are as follows:
[0348] (1) All tables must define a primary key. In actual applications, you can use the unique index in the data model as the primary key, or add a ROWID column that has no business significance as the primary key. (2) All fields must define the NOT NULL attribute, and special values outside the normal business value range can be used to represent null values.
[0349] The embodiment of the present invention provides a specific implementation of a data processing device based on a financial core online transaction scenario that can implement all the contents of the data processing method based on a financial core online transaction scenario, see Figure 3 The data processing device based on the financial core online transaction scenario specifically includes the following contents:
[0350] An acquisition module 10, used to acquire transaction data based on a financial core online transaction scenario;
[0351] An online transaction processing module 20, configured for each of at least two threads to perform a preset online transaction processing based on the transaction data;
[0352] A statistics module 30, for obtaining the response time and number of completed transactions of each transaction in the online transaction processing;
[0353] The processing module 40 is used to modify the transaction data based on the response time of each transaction and the number of completed transactions.
[0354] The online transaction processing includes: account opening, account deposit, account withdrawal, account transfer, account information query, account detail query and account payment.
[0355] Wherein, the online transaction processing module includes:
[0356] An online transaction processing unit for mixed execution of account opening, account deposit, account withdrawal, account transfer, account information inquiry, account detail inquiry and account payment in a preset ratio;
[0357] The hot account unit is used to schedule a preset number of payer accounts to make account payments to the same payee account.
[0358] Among them, it also includes:
[0359] The indicator module is used to periodically obtain the performance statistics of the database under online transaction processing;
[0360] The performance statistical indicators are used to determine the supporting performance of the database in the financial core online transaction scenario.
[0361] The performance statistical indicators include: transaction response time and the number of completed transactions.
[0362] The embodiment of the data processing device based on the financial core online transaction scenario provided by the present invention can be specifically used to execute the processing flow of the embodiment of the data processing method based on the financial core online transaction scenario in the above-mentioned embodiment. Its functions will not be repeated here, and reference can be made to the detailed description of the above-mentioned method embodiment.
[0363] From the above description, it can be known that the data processing device based on the financial core online transaction scenario provided by the embodiment of the present invention can process the transaction data of the financial core online transaction scenario by acquiring the transaction data based on the financial core online transaction scenario; each of at least two threads performs the preset online transaction processing based on the transaction data; acquires the response time of each transaction and the number of completed transactions in the online transaction processing; and modifies the transaction data based on the response time of each transaction and the number of completed transactions. It can process the transaction data of the financial core online transaction scenario, thereby improving the service support performance of the online transaction in the financial industry.
[0364] The present application provides an embodiment of an electronic device for implementing all or part of the content of the data processing method based on the financial core online transaction scenario. The electronic device specifically includes the following content:
[0365] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between related devices; the electronic device can be a desktop computer, a tablet computer and a mobile terminal, etc., and the present embodiment is not limited thereto. In the present embodiment, the electronic device can be implemented with reference to the embodiment for realizing the data processing method based on the financial core online transaction scenario and the embodiment for realizing the data processing device based on the financial core online transaction scenario, and the contents thereof are incorporated herein, and the repeated parts are not repeated.
[0366] Figure 4 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Figure 4 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Figure 4 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0367] In one embodiment, the data processing function based on the financial core online transaction scenario can be integrated into the central processor 9100. The central processor 9100 can be configured to perform the following control:
[0368] Acquire transaction data based on the core online transaction scenario of finance; each of at least two threads executes preset online transaction processing based on the transaction data; acquire the response time and the number of completed transactions of each transaction in the online transaction processing; modify the transaction data based on the response time and the number of completed transactions of each transaction. The transaction data of the core online transaction scenario of finance can be processed, thereby improving the service support performance of online transactions in the financial industry.
[0369] It can be seen from the above description that the electronic device provided by the embodiment of the present application can process transaction data of financial core online transaction scenarios, thereby improving the service support performance of online transactions in the financial industry.
[0370] In another embodiment, the data processing device based on the financial core online transaction scenario can be configured separately from the central processing unit 9100. For example, the data processing based on the financial core online transaction scenario can be configured as a chip connected to the central processing unit 9100, and the data processing function based on the financial core online transaction scenario can be realized through the control of the central processing unit.
[0371] like Figure 4 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Figure 4 In addition, the electronic device 9600 may also include Figure 4 For components not shown, reference may be made to the prior art.
[0372] like Figure 4 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.
[0373] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.
[0374] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.
[0375] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.
[0376] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0377] The communication module 9110 is a transmitter / receiver 9110 that sends and receives signals via an antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0378] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module, etc. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.
[0379] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all steps of the data processing method based on the financial core online transaction scenario in the above embodiment. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all steps of the data processing method based on the financial core online transaction scenario in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0380] Acquire transaction data based on a core financial online transaction scenario; each of at least two threads executes a preset online transaction process based on the transaction data; acquire the response time and the number of completed transactions of each transaction in the online transaction process; and modify the transaction data based on the response time and the number of completed transactions of each transaction.
[0381] It can be seen from the above description that the computer-readable storage medium provided by the embodiment of the present invention can process transaction data of financial core online transaction scenarios, thereby improving the service support performance of online transactions in the financial industry.
[0382] Although the present invention provides method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, in a parallel processor or multi-threaded processing environment).
[0383] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, devices (systems) or computer program products. Therefore, the embodiments of this specification may take the form of complete hardware embodiments, complete software embodiments or embodiments combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0384] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0385] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0386] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0387] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict. The present invention is not limited to any single aspect, any single embodiment, or any combination and / or replacement of these aspects and / or embodiments. Moreover, each aspect and / or embodiment of the present invention can be used alone or in combination with one or more other aspects and / or embodiments thereof.
[0388] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. A data processing method based on a financial core online transaction scenario, characterized in that: include: Obtain transaction data based on core financial online transaction scenarios; Each of the at least two threads executes a preset online transaction process based on the transaction data; Get the response time and number of completed transactions for each transaction in online transaction processing; modifying the transaction data based on the response time of each transaction and the number of transactions completed; The online transaction processing includes: account opening, account deposit, account withdrawal, account transfer, account information inquiry, account detail inquiry and account payment; Each of the at least two threads executes a preset online transaction process based on the transaction data, including: Mix and execute account opening, account deposit, account withdrawal, account transfer, account information inquiry, account detail inquiry and account payment according to the preset ratio; Schedule a preset number of payer accounts to make account payments to the same payee account.
2. The data processing method based on the financial core online transaction scenario according to claim 1 is characterized in that: After modifying the transaction data based on the response time and the number of completed transactions of each transaction, the method further includes: Periodically obtain database performance statistics under online transaction processing; The performance statistical indicators are used to determine the supporting performance of the database in the financial core online transaction scenario.
3. The data processing method based on the financial core online transaction scenario according to claim 2 is characterized in that: The performance statistical indicators include: transaction response time and the number of completed transactions.
4. A data processing device based on a financial core online transaction scenario, characterized in that: include: The acquisition module is used to obtain transaction data based on the core financial online transaction scenario; An online transaction processing module, configured for each of at least two threads to perform a preset online transaction processing based on the transaction data; Statistics module, used to obtain the response time and number of completed transactions of each transaction in online transaction processing; A processing module for modifying the transaction data based on the response time of each transaction and the number of completed transactions; The online transaction processing includes: account opening, account deposit, account withdrawal, account transfer, account information inquiry, account detail inquiry and account payment; The online transaction processing module includes: An online transaction processing unit for mixed execution of account opening, account deposit, account withdrawal, account transfer, account information inquiry, account detail inquiry and account payment in a preset ratio; The hot account unit is used to schedule a preset number of payer accounts to make account payments to the same payee account.
5. The data processing device based on the financial core online transaction scenario according to claim 4 is characterized in that: Also includes: The indicator module is used to periodically obtain the performance statistics of the database under online transaction processing; The performance statistical indicators are used to determine the supporting performance of the database in the financial core online transaction scenario.
6. The data processing device based on the financial core online transaction scenario according to claim 5 is characterized in that: The performance statistical indicators include: transaction response time and the number of completed transactions.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the data processing method based on the financial core online transaction scenario described in any one of claims 1 to 3 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data processing method based on the financial core online transaction scenario described in any one of claims 1 to 3 are implemented.
