Methods and devices for automating batch processing in bank credit and accounting systems

By using JMeter and SSHCommand samplers for automated operations, the inefficiency and error-prone nature of manual batch processing in bank credit and accounting systems have been resolved, achieving an efficient and accurate automated testing process.

CN115905004BActive Publication Date: 2026-03-10WUHAN ZBANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-11
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In the functional testing process of existing bank credit systems and accounting systems, there are problems such as inefficiency, error-proneness, long processing time, and inability to provide timely notifications when manually performing batch processing operations.

Method used

The JMeter tool and SSHCommand sampler were used to simulate logging into the bank's credit and accounting system. Files were remotely copied via HTTP Request and SSHCommand sampler to automate the batch processing workflow, and the results were notified via WeChat.

Benefits of technology

It improved testing efficiency, reduced human error, shortened the testing cycle, and saved labor costs.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

This invention relates to the field of automated testing technology, and provides a method and apparatus for automated batch processing of bank credit and accounting systems. The main purpose is to facilitate project teams in using automated script execution during testing to replace manual batch processing and file handling operations in related systems. The main scheme includes: using a sampler interface to request simulated login to the accounting system and trigger the main batch processing flow of the accounting system, waiting for the batch processing to complete, and generating the end-of-day batch file corresponding to the batch processing date; remotely connecting to the credit server and deleting the old end-of-day files required for the previous batch processing stored on the credit server, then using the sampler again to remotely connect to the accounting server and remotely copy the end-of-day batch files generated by the accounting batch processing to the corresponding storage directory on the credit system server, ready for use by the credit system batch processing; using the sampler interface to request simulated login to the credit batch processing system, using the interface to trigger the end-of-day batch processing flow of the credit system, and waiting for the batch processing to succeed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated testing, and provides a method and apparatus for automated batch processing of bank credit systems and accounting systems. Technical Background

[0002] Currently, when testers conduct functional tests on systems similar to bank credit and accounting, they need to test various repayment scenarios, including early repayment, current repayment, and overdue repayment. The prerequisite for meeting these test scenarios is to first successfully disburse loans through the credit system, and then run batch processing on the credit and accounting systems to complete daily cuts and generate corresponding end-of-day loan, repayment, and reconciliation documents.

[0003] The operation method is described as follows: Testers log in to the accounting batch processing system, search for and execute the daily batch that needs to be run, and wait and observe whether the batch is completed on the page. After the accounting daily batch is completed, they retrieve the relevant daily batch files from the accounting server, place them in the specified directory of the credit system, and then log in to the credit batch processing system to execute and manually wait for the daily batch of the credit system to be completed.

[0004] Technical defects

[0005] The above-mentioned manual batch processing method has the following drawbacks:

[0006] ① Manually logging into the credit and accounting system and performing batch processing is mechanized, inefficient, and time-consuming;

[0007] ② There are instances of operational errors in manually executing credit and accounting system batch processing;

[0008] ③ Manually copying system files is time-consuming and prone to errors;

[0009] ④ The batch processing process is time-consuming, and the results are not communicated to the executor upon completion, requiring manual waiting and thus hindering productivity. Summary of the Invention

[0010] The purpose of this invention is to help functional testers solve the problems of inefficiency, repetitiveness, and error in manual batch operations of bank credit systems and accounting systems, thereby improving the accuracy and efficiency of testing and shortening the testing cycle.

[0011] To achieve the above objectives, the present invention employs the following technical means:

[0012] A method for automating batch processing in bank credit and accounting systems includes the following steps:

[0013] Step 1: Use the HTTP Request sampler interface of the JMeter tool to simulate logging into the accounting system and trigger the batch processing flow of the main accounting batch. Wait until the batch processing is completed and generate the end-of-day batch file corresponding to the batch processing date, which will be used in Step 2.

[0014] Step 2: Use the SSHCommand sampler of JMeter to remotely connect to the credit server and delete the old end-of-day batch files required for the previous batch run stored on the credit server. Then, use the SSHCommand sampler to remotely connect to the accounting server again and use the Linux command scp to remotely copy the end-of-day batch files generated by the accounting batch run to the corresponding storage directory on the credit system server, so that they can be used in step 3 when the credit system runs the batch.

[0015] Step 3: Use the HTTP Request sampler interface to simulate logging into the credit approval system, use the interface to trigger the credit system's end-of-day approval process and wait for the approval to succeed, and complete the WeChat push notification of the result.

[0016] In the above technical solution, step 1 mainly completes the batch processing of the accounting system, which specifically includes the following steps:

[0017] Step 1.1: Use the JDBC Connection Configuration of the JMeter tool to connect to the calculation database, and use the JDBC Request sampler to query the database to find that the initial status of the calculation master batch is normal;

[0018] Step 1.2: The HTTP Request Sampler API requests the login URL, with the username and password as the request parameters, to simulate the login accounting system. The HTTP Cookie Manager is used to automatically save the cookie after login, which will be used for authentication in subsequent API requests.

[0019] Step 1.3: The HTTP Request sampler interface requests the URL that triggers the calculation of the main batch, with 'main' as the request parameter, triggering the execution of the main batch;

[0020] Step 1.4: Connect to the accounting database, use the Loop Controller in the JMeter tool, and nest the JDBC Request Sampler under the Loop Controller to query the accounting master batch status until the status becomes the final state.

[0021] In the above technical solution, step 2 mainly completes the processing of post-approval end-of-day documents in the accounting system and pre-approval end-of-day documents in the credit system, specifically including the following steps:

[0022] Step 2.1: Connect to the credit database, use the JDBC Request sampler select to query the current date of the credit system and save it;

[0023] Step 2.2: Log in to the credit server using the SSHCommand sampler, cd to the specified directory, use the rm -f command to delete old end-of-day batch files with dates other than the current system date, and assert whether the execution was successful;

[0024] Step 2.3: Log in to the credit server using the SSHCommand sampler, cd to the specified directory, and use the mv command to modify an old file that is not the current system date but is necessary for batch processing. Specifically, rename the file by changing the date part of the file name to the current credit system date, and assert whether the execution was successful.

[0025] Step 2.4: Log in to the accounting server using the SSHCommand sampler, and use scp [option] xxx.dat user@server-ip: / path / to / saveDat to copy the local files of the accounting service to the specified directory on the remote host, i.e., the specified directory of the credit system server. A passwordless connection needs to be established between the two servers. The stage process is as follows:

[0026] Stage 1: Log in to the target credit server, execute "ssh-keygen -t rsa -P"" to generate the key file / root / .ssh / id_rsa.pub, and copy the contents of the key file;

[0027] Stage 2: Log in to the source accounting server and copy the contents of the key file to the / root / .ssh / authorized_keys file.

[0028] In the above technical solution, step 3 mainly completes the end-of-day approval process of the credit system and completes the notification, specifically including the following steps:

[0029] Step 3.1: Connect to the credit database and use the JDBC Request sampler to query the initial status of the credit day-end batch, which is normal.

[0030] Step 3.2: The HTTP Request sampler interface requests the URL that triggers the end-of-day batch processing, and obtains the jobRunld;

[0031] Step 3.3: Use the Loop Controller in the JMeter tool to nest an HTTP Request sampler interface under the Loop Controller to request the URL of the batch status. Use jobRunld as the input parameter to get the batch status JobRunStatus until it becomes the final state.

[0032] Step 3.4: Determine if JobRunStatus changes to the final state, indicating successful batch execution at the end of the credit day, and trigger the notification interface via WeChat to notify relevant personnel of the batch execution results.

[0033] This invention also provides an apparatus for automating batch processing in bank credit systems and accounting systems, comprising the following modules:

[0034] End-of-day batch file module: Uses the HTTP Request sampler interface of the Jmeter tool to simulate logging into the accounting system and triggers the batch running process of the accounting master batch. Waits until the batch running is completed and generates the end-of-day batch file corresponding to the batch running date, which is then used by the end-of-day batch file synchronization module.

[0035] End-of-day batch file synchronization module: Use the SSHCommand sampler of Jmeter tool to remotely connect to the credit server and delete the old end-of-day batch files required for the previous batch run stored on the credit server. Then, use the SSHCommand sampler to remotely connect to the accounting server again and use the Linux command scp to remotely copy the end-of-day batch files generated by the accounting batch run to the corresponding storage directory on the credit system server, which will be used by the credit system batch run module in the next batch run module.

[0036] The batch processing module uses an HTTP Request sampler interface to simulate logging into the credit batch processing system, triggers the credit system's end-of-day batch processing flow using the interface, waits for the batch processing to succeed, and pushes the result notification to WeChat.

[0037] The above-mentioned device includes the following steps in implementing the end-of-day batch file module:

[0038] Step 1.1: Use the JDBC Connection Configuration of the JMeter tool to connect to the calculation database, and use the JDBC Request sampler to query the database to find that the initial status of the calculation master batch is normal;

[0039] Step 1.2: The HTTP Request Sampler API requests the login URL, with the username and password as the request parameters, to simulate the login accounting system. The HTTP Cookie Manager is used to automatically save the cookie after login, which will be used for authentication in subsequent API requests.

[0040] Step 1.3: The HTTP Request sampler interface requests the URL that triggers the calculation of the main batch, with 'main' as the request parameter, triggering the execution of the main batch;

[0041] Step 1.4: Connect to the accounting database, use the Loop Controller in the JMeter tool, and nest the JDBC Request Sampler under the Loop Controller to query the accounting master batch status until the status becomes the final state.

[0042] The above-mentioned device implements the following steps for the end-of-day batch file synchronization module:

[0043] Step 2.1: Connect to the credit database, use the JDBC Request sampler select to query the current date of the credit system and save it;

[0044] Step 2.2: Log in to the credit server using the SSHCommand sampler, cd to the specified directory, use the rm -f command to delete old end-of-day batch files with dates other than the current system date, and assert whether the execution was successful;

[0045] Step 2.3: Log in to the credit server using the SSHCommand sampler, cd to the specified directory, and use the mv command to modify an old file that is not the current system date but is necessary for batch processing. Specifically, rename the file by changing the date part of the file name to the current credit system date, and assert whether the execution was successful.

[0046] Step 2.4: Log in to the accounting server using the SSHCommand sampler, and use scp [option] xxx.dat user@server-ip: / path / to / saveDat to copy the local files of the accounting service to the specified directory on the remote host, i.e., the specified directory of the credit system server. A passwordless connection needs to be established between the two servers. The stage process is as follows:

[0047] Stage 1: Log in to the target credit server, execute "ssh-keygen -t rsa -P"" to generate the key file / root / .ssh / id_rsa.pub, and copy the contents of the key file;

[0048] Stage 2: Log in to the source accounting server and copy the contents of the key file to the / root / .ssh / authorized_keys file.

[0049] The batch processing module in the above-mentioned device specifically includes the following steps:

[0050] Step 3.1: Connect to the credit database and use the JDBC Request sampler to query the initial status of the credit day-end batch, which is normal.

[0051] Step 3.2: The HTTP Request sampler interface requests the URL that triggers the end-of-day batch processing, and obtains the jobRunld;

[0052] Step 3.3: Use the Loop Controller in the JMeter tool to nest an HTTP Request sampler interface under the Loop Controller to request the URL of the batch status. Use jobRunld as the input parameter to get the batch status JobRunStatus until it becomes the final state.

[0053] Step 3.4: Determine if JobRunStatus changes to the final state, indicating successful batch execution at the end of the credit day, and trigger the notification interface via WeChat to notify relevant personnel of the batch execution results.

[0054] Because the present invention employs the above-mentioned technical means, it has the following beneficial effects:

[0055] ① By using this invention, some repetitive mechanical operations of functional testers can be reduced, saving labor costs and improving work efficiency.

[0056] ② By using this invention, the probability of functional testers making erroneous operations on the system can be reduced.

[0057] ③ By using this invention, functional testers can quickly generate a large amount of business data, reducing the waiting time for manual data generation. Specific implementation methods

[0058] The embodiments of the present invention will be described in detail below. Although the present invention will be described and illustrated in conjunction with some specific embodiments, it should be noted that the present invention is not limited to these embodiments. On the contrary, any modifications or equivalent substitutions made to the present invention should be covered within the scope of the claims of the present invention.

[0059] Furthermore, to better illustrate the present invention, numerous specific details are set forth in the following detailed embodiments. Those skilled in the art will understand that the present invention can be practiced without these specific details.

[0060] A method for automating batch processing in bank credit and accounting systems includes the following steps:

[0061] Step 1: Use the HTTP Request sampler interface of the JMeter tool to simulate logging into the accounting system and trigger the batch processing flow of the main accounting batch. Wait until the batch processing is completed and generate the end-of-day batch file corresponding to the batch processing date, which will be used in Step 2.

[0062] Step 2: Use the SSHCommand sampler of JMeter to remotely connect to the credit server and delete the old end-of-day files required for the previous batch run stored on the credit server. Then, use the SSHCommand sampler to remotely connect to the accounting server again and use the Linux command scp to remotely copy the end-of-day batch files generated by the accounting batch run to the corresponding storage directory on the credit system server, so that they can be used in step 3 for the credit system batch run.

[0063] Step 3: Use the HTTP Request sampler interface to simulate logging into the credit approval system, use the interface to trigger the credit system's end-of-day approval process and wait for the approval to succeed, and complete the WeChat push notification of the result;

[0064] In the above technical solution, step 1 mainly completes the batch processing of the accounting system, which specifically includes the following steps:

[0065] Step 1.1: Use the JDBC Connection Configuration of the JMeter tool to connect to the calculation database, and use the JDBC Request sampler to query the initial status of the calculation master batch, which is normal.

[0066] Step 1.2: The HTTP Request Sampler API requests the login URL, with the username and password as the request parameters, to simulate the login accounting system. The HTTP Cookie Manager is used to automatically save the cookie after login, which will be used for authentication in subsequent API requests.

[0067] Step 1.3: The HTTP Request sampler interface requests the URL that triggers the calculation of the main batch, with 'main' as the request parameter, triggering the execution of the main batch;

[0068] Step 1.4: Connect to the accounting database, use the Loop Controller in the JMeter tool, and nest the JDBC Request Sampler under the Loop Controller to query the accounting master batch status until the status becomes the final state.

[0069] In the above technical solution, step 2 mainly completes the processing of post-approval end-of-day documents in the accounting system and pre-approval end-of-day documents in the credit system, specifically including the following steps:

[0070] Step 2.1: Connect to the credit database, use the JDBC Request sampler select to query the current date of the credit system and save it;

[0071] Step 2.2: Log in to the credit server using the SSHCommand sampler, cd to the specified directory, use the rm -f command to delete the old (non-current system date) end-of-day batch files, and assert whether the execution was successful;

[0072] Step 2.3: Log in to the credit server using the SSHCommand sampler, cd to the specified directory, use the mv command to modify old (non-current system date) files that are not at the end of the day but are necessary for batch processing. Specifically, rename the files by changing the date part of the filename to the current credit system date, and assert whether the execution was successful.

[0073] Step 2.4: Log in to the verification server using the SSHCommand sampler, and use scp [option] xxx.dat user@server-ip: / path / to / saveDat to copy the local file to the specified directory on the remote host. This requires establishing a passwordless connection between the two servers. The stage process is as follows:

[0074] Stage 1: Log in to the target (credit) server, execute ssh-keygen -t rsa -P to generate the key file / root / .ssh / id_rsa.pub, and copy the contents of the key file;

[0075] Stage 2: Log in to the source (accounting) server and copy the contents of the key file to the / root / .ssh / authorized_keys file.

[0076] In the above technical solution, step 3 mainly completes the end-of-day approval process of the credit system and completes the notification, specifically including the following steps:

[0077] Step 3.1: Connect to the credit database and use the JDBC Request sampler to query the initial status of the credit day-end batch, which is normal.

[0078] Step 3.2: The HTTP Request sampler interface requests the URL that triggers the end-of-day batch processing, and obtains the jobRunld;

[0079] Step 3.3: Use the Loop Controller in the JMeter tool to nest an HTTP Request Sampler interface under the Loop Controller to request the URL of the batch status. Use jobRunld as the input parameter to get the batch status JobRunStatus until it becomes the final state.

[0080] Step 3.4: Determine if JobRunStatus changes to the final state, indicating successful batch execution at the end of the credit day, and trigger the notification interface via WeChat to notify relevant personnel of the batch execution results.

Claims

1. A method for automatic batch running of a bank credit system, an accounting system, characterized in that, Comprise the following steps: Step 1: using Jmeter tool HTTP Request sampler interface request simulation login accounting system, and trigger accounting main batch running batch process, wait until the running batch is completed, generate the running batch date corresponding to the end of the day batch file, step 2 is used; Step 2: using Jmeter tool SSHCommand sampler remote link to credit server, and delete the old day-end batch file required by the last running batch stored in the credit server, and use SSHCommand sampler to remote link to accounting server again, and use linux command scp to remote copy the day-end batch file generated by the accounting running batch to the corresponding storage directory of the credit system server, for step 3 credit system running batch; Step 3: using HTTP Request sampler interface request simulation login credit running batch system, using interface trigger credit system day-end running batch process and wait for running batch success, and complete the wechat push result notification.

2. The method for automatic batch running of bank credit system and accounting system according to claim 1, characterized in that, Step 1 mainly completes the accounting system running batch, comprising the following steps: Step 1.1: using Jmeter tool JDBC Connection Configuration link accounting database, through JDBC Request sampler select query database in the initial state of accounting main batch quantity normal; Step 1.2: HTTP Request sampler interface request login url, username and password as request parameters, simulate login accounting system, use HTTP Cookie Manager to automatically save cookie after login, as the identity authentication of subsequent interface request; Step 1.3: HTTP Request sampler interface request trigger accounting main batch quantity url,'main' as request parameter, trigger main batch quantity execution; Step 1.4: link accounting database, using Jmeter tool Loop Controller loop controller, using JDBC Request sampler query accounting main batch quantity state under the loop controller until the state becomes final state.

3. The method for automatic batch running of bank credit system and accounting system according to claim 1, characterized in that, Step 2 mainly completes the accounting system batch after day-end file and credit system batch before day-end file processing, comprising the following steps: Step 2.1: link credit database, using JDBC Request sampler select query credit system current date and save; Step 2.2: SSHCommand sampler login credit server, cd to the specified directory, use rm-f command to delete the old day-end running batch file of the old date which is not the current system date, and assert whether the execution is successful; Step 2.3: SSHCommand sampler login credit server, cd to the specified directory, use mv command to modify the old non-day-end but running batch required file of the old date which is not the current system date, specifically modify the date part in the file name to the current credit system date to rename the file, and assert whether the execution is successful; Step 2.4: SSHCommand sampler logs into the accounting server and uses scp [option] xxx.dat user@server-ip: / path / to / saveDat to copy the accounting service local file to the specified directory on the remote host, i.e. the specified directory on the credit system server. It needs to meet the requirements of establishing a password-free link between the two servers, and the stage process is as follows: Stage 1: Log in to the target credit server and execute ssh-keygen -t rsa -P "" to generate a secret key file / root / .ssh / id_rsa.pub, and copy the secret key file content; Stage 2: Log in to the source accounting server and copy the secret key file content to the / root / .ssh / authorized_keys file.

4. The method for automatic batch running of bank credit system and accounting system according to claim 1, characterized in that, Step 3 mainly completes the credit system daily batch and completes the notification, which includes the following steps: Step 3.1: Link the credit database and use the JDBC Request sampler to query the credit daily batch initial state; Step 3.2: HTTP Request sampler interface request triggers the daily batch url to obtain jobRunld; Step 3.3: Use the Loop Controller of Jmeter tool to control the cycle, and use HTTP Request sampler interface request to get the batch status url under the cycle controller, jobRunld as input parameter to get the batch status JobRunStatus until it becomes terminal state; Step 3.4: Determine JobRunStatus becomes terminal state, credit daily batch execution is successful, trigger notification interface WeChat to notify relevant personnel of the batch result.

5. A device for automatic batch running of a bank credit system, accounting system, characterized in that, Including the following modules: Daily batch file module: use HTTP Request sampler interface request of Jmeter tool to simulate login accounting system, and trigger the running of accounting main batch process, wait until the batch is completed, generate the daily batch file corresponding to the running date, and wait for the daily batch file synchronization module to use; Daily batch file synchronization module: use SSHCommand sampler of Jmeter tool to remotely link to the credit server and delete the old daily batch file required by the last batch on the credit server. Then use SSHCommand sampler to remotely link to the accounting server and use linux command scp to remotely copy the daily batch file generated by the accounting batch to the corresponding storage directory of the credit system server, ready for the credit system batch of the step batch module; Batch module: use HTTP Request sampler interface request to simulate login credit batch system, use interface to trigger credit system daily batch process and wait for batch success, and complete WeChat push result notification.

6. The device for automatic batch running of bank credit system and accounting system according to claim 5, characterized in that, The daily batch file module includes the following steps: Step 1.1: Link to the accounting database using the JDBC Connection Configuration of the Jmeter tool, and use the JDBC Request sampler to select the initial state of the accounting main batch in the database. Step 1.2: The HTTP Request sampler interfaces request the login url, and the username and password are used as request parameters to simulate logging into the accounting system. The HTTP Cookie Manager is used to automatically save the cookie after login, which is used as the identity authentication for subsequent interface requests. Step 1.3: The HTTP Request sampler interfaces request the url to trigger the accounting main batch, and'main' is used as the request parameter to trigger the main batch execution. Step 1.4: Link to the accounting database, use the Loop Controller of the Jmeter tool to control the loop, and use the JDBC Request sampler to query the state of the accounting main batch until the state becomes the final state.

7. The method for automatic batch running of bank credit system and accounting system according to claim 5, characterized in that, The day-end batch file synchronization module specifically includes the following steps: Step 2.1: Link to the credit database, and use the JDBC Request sampler to select the current date of the credit system and save it. Step 2.2: The SSHCommand sampler logs in to the credit server, cd to the specified directory, and uses the rm-f command to delete the old day-end batch file that is not the current system date. Assert whether the execution is successful. Step 2.3: The SSHCommand sampler logs in to the credit server, cd to the specified directory, and uses the mv command to modify the old non-day-end but necessary batch file that is not the current system date. Specifically, the date part of the file name is modified to the current credit system date to rename the file. Assert whether the execution is successful. Step 2.4: The SSHCommand sampler logs in to the accounting server and uses the scp[option]xxx.dat user@server-ip: / path / to / saveDat to copy the accounting service local file to the specified directory of the credit system server. It needs to meet the requirements of establishing a password-free link between the two servers. The stage process is as follows: Stage1: Log in to the target credit server and execute ssh-keygen-t rsa-P" to generate a secret key file / root / .ssh / id_rsa.pub. Copy the secret key file content. Stage2: Log in to the source accounting server and copy the secret key file content to the / root / .ssh / authorized_keys file.

8. The method for automatic batch running of bank credit system and accounting system according to claim 5, characterized in that, The batch module implementation specifically includes the following steps: Step 3.1: Link to the credit database, and use the JDBC Request sampler to query the initial state of the credit day-end batch. Step 3.2: The HTTP Request sampler interfaces request the url to trigger the end batch, and get the jobRunld; Step 3.3: Use the Loop Controller of the Jmeter tool to control the cycle, and use the HTTP Request sampler interface request to obtain the url of the batch state under the cycle controller, and use jobRunld as the input parameter to obtain the batch state JobRunStatus until it becomes the final state; Step 3.4: Determine whether JobRunStatus becomes the final state, and the credit daily batch execution is successful, triggering the notification interface to notify the relevant personnel of the batch result.

Citation Information

Patent Citations

  • Internet syndicated loan system and method

    CN108389123A

  • Method and system for centralized management and control of business dates of subsystems

    CN114070849A