Method for processing real-time income distribution based on batch file mode
By adopting batch file processing methods in the bank's real-time income distribution system, combining line-by-line reading, batch storage, paging reading and multi-threading technical means, the resource occupation and response speed of existing systems at high transaction volumes is solved. The problem of decline has achieved rapid, safe and efficient profit distribution.
Patent Information
- Application Number
- CN202411478023.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-18
AI Technical Summary
When the number of transactions continues to grow, the existing bank real-time income distribution system will occupy a large amount of server resources and the response speed will decrease. Especially during the dividend payment date or annual settlement, it may cause the customer interest rate income to be unable to be distributed quickly.
Using a batch file-based method to process real-time income distribution, through line-by-line reading and batch database data, combined with pagination reading and multi-threading, data push and processing are used to ensure the system resources Rational allocation and rapid data processing.
It improves the speed and throughput of data processing, is suitable for the real-time processing needs of large-scale data, enhances the interactivity and response speed between systems, ensures data security and processing efficiency, and reduces operation and maintenance costs and manpower investment.
Smart Images

Figure CN119477502A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of bank income distribution, and in particular relates to a method for processing real-time income distribution based on a batch file mode. Background Art
[0002] At present, most banks in the industry use real-time transactions to distribute income. When the number of transactions continues to grow, it will occupy more server system resources and the response speed will drop significantly. Especially when it comes to dividend payment date or annual settlement, the data volume is large and the customer's interest income may not be distributed to personal accounts quickly. Summary of the invention
[0003] The present invention aims to provide a method for processing real-time income payment based on batch file mode, so as to solve the technical problems existing in the existing real-time income payment of banks.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0005] A method for processing real-time revenue distribution based on a batch file method comprises the following steps:
[0006] (1) Read the latest full daily end-of-day data line by line and record it into the system. When a predetermined number of lines of data are read, data storage processing begins;
[0007] (2) Verify the amount of original data that meets the conditions for profit distribution to ensure that the basis for calculating the profit is accurate;
[0008] (3) The marketing system reads the order data of the revenue date from the database in pages according to the revenue rules, and calculates the revenue data to be distributed;
[0009] (4) The marketing system writes the calculated revenue data to be distributed into a batch file and pushes it to the core system for processing;
[0010] (5) After the core system processes the distribution revenue data, it writes the distribution results into the return file and pushes it to the marketing system;
[0011] (6) The marketing system updates the local status and feeds back the processing results to the core system.
[0012] Furthermore, in step (1), the text data is read line by line using a file stream, and the data storage process is started when a predetermined number of lines is reached.
[0013] Furthermore, in step (1), data writing is performed in batches through MyBatis, and the data is written into the database in batches with a predetermined number of entries per batch.
[0014] Furthermore, the step (2) further includes: acquiring data by paging, and using multiple threads to perform data comparison.
[0015] Furthermore, in step (3), when calculating the revenue, the order data related to the revenue date is read step by step from the database in a paging reading manner.
[0016] Furthermore, in step (4), the marketing system pushes the file containing the revenue data to be distributed to the designated path of the core system via FTP / SFTP or other secure protocols, and informs the core system that the file is ready via a real-time notification mechanism.
[0017] Furthermore, in step (5), the core system downloads and processes the file after receiving the notification, and pushes the result file to the marketing system after the processing is completed, and notifies it that the processing is completed.
[0018] Furthermore, in step (6), the marketing system processes the file after receiving the return file, updates the status of the corresponding data in the local database, and feeds back the processing result to the core system.
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] 1) The present invention greatly improves the speed and throughput of data processing by adopting a batch file processing method and combining technical means such as line-by-line reading and batch storage. This method can effectively meet the real-time processing needs of large-scale data, and is particularly suitable for application scenarios that require rapid response, such as financial transactions;
[0021] 2) The present invention distributes income through files, using a unique identifier (such as a serial number) to track the entire process of each income data, thereby improving data processing efficiency and traceability;
[0022] 3) The real-time message push mechanism between systems ensures that files can be processed in a timely manner after being pushed, enhancing the interactivity and response speed between systems.
[0023] 4) Through multiple encryption processing of file data (such as overall file encryption and key data encryption), the security of data during transmission is effectively protected, the risk of data leakage is reduced, and the security of data transmission is guaranteed;
[0024] 5) The present invention reasonably allocates system resources through technical means such as paging to obtain data and multi-threaded processing, thereby avoiding problems such as memory overflow. This method not only improves the efficiency of data processing, but also ensures the stable operation of the system;
[0025] In summary, the present invention realizes automated processing and adopts an efficient file transfer and data processing mechanism, which reduces the need for manual intervention, thereby reducing operation and maintenance costs and manpower investment; the present invention can quickly and accurately process revenue distribution, which can be reflected in the user's account in a timely manner, thereby improving user experience and service satisfaction. At the same time, through the real-time notification mechanism, users can understand the status of revenue distribution more quickly, thereby increasing service transparency; the present invention processes real-time revenue distribution data based on a batch file method, which can ensure that when the data volume is large, the bank system can not only quickly process a large amount of data in batches, but also improve transaction security and make more rational use of server resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0027] Figure 1 This is a flowchart of the document storage process of the present invention;
[0028] Figure 2 A flow chart of data comparison and profit calculation of the present invention;
[0029] Figure 3 This is a flow chart of the revenue distribution of the present invention. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0031] The present invention is further described in detail below in conjunction with embodiments.
[0032] A specific embodiment of a method for processing real-time revenue distribution based on a batch file mode provided by the present invention:
[0033] A method for processing real-time revenue distribution based on a batch file method comprises the following steps:
[0034] (1) Read the latest full daily end-of-day data line by line and record it into the system. When a predetermined number of lines of data are read, data storage processing begins. Figure 1 As shown;
[0035] To prevent memory overflow, we use file stream to read text data line by line, and start data storage processing when the predetermined number of lines is reached. To optimize the writing speed, we use MyBatis to execute data writing in batches, and write the data to the database in batches with a predetermined number of entries per batch.
[0036] (2) Check the amount of the original data that meets the conditions for profit distribution to ensure the accuracy of the base for calculating the profit; specifically, obtain data in pages and use multi-threading to compare the data. By obtaining data in pages, the amount of data loaded at a time is reduced, and multi-threading is used to accelerate the data comparison process, such as Figure 2 As shown;
[0037] (3) The marketing system reads the order data of the revenue date from the database in pages according to the revenue rules, and calculates the revenue data to be distributed; the order data of the revenue date is read from the database in pages to calculate the revenue, so as to prevent memory overflow caused by a full read. Figure 2 shown.
[0038] (4) Figure 3 As shown, the marketing system writes the calculated revenue data to be distributed into a batch file and pushes it to the core system for processing; specifically, the marketing system pushes the file containing the revenue data to be distributed to the designated path of the core system through FTP / SFTP or other security protocols, and informs the core system that the file is ready through a real-time notification mechanism;
[0039] (5) After the core system processes the distribution revenue data, it writes the distribution results into the return file and pushes it to the marketing system. Furthermore, after receiving the notification, the core system downloads the file and processes it. After the processing is completed, the result file is pushed to the marketing system and notified of the completion of the processing. The result file also uses a real-time notification mechanism to ensure that the marketing system can be informed of the processing results in a timely manner.
[0040] (6) After receiving the return file, the marketing system processes the file, updates the status of the corresponding data in the local database, and feeds back the processing results to the core system.
[0041] Among them, the batch file adopts a file-based income distribution method, and realizes real-time tracing of each income data through a unique identifier (such as a serial number), thereby improving the business data processing throughput and recording the status information of the entire data process and each processing link.
[0042] This embodiment provides a method for processing real-time revenue distribution based on a batch file method, and the file data involved adopts multiple encryption methods, including but not limited to overall file encryption and key data encryption, to enhance data security.
[0043] It should be noted that, in this article, terms such as "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus.
[0044] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for processing real-time revenue distribution based on batch files, characterized in that: The following steps are involved: (1) Read the latest full daily end-of-day data line by line and record it into the system. When a predetermined number of lines of data are read, data storage processing begins; (2) Verify the amount of original data that meets the conditions for profit distribution to ensure that the basis for calculating the profit is accurate; (3) The marketing system reads the order data of the revenue date from the database in pages according to the revenue rules, and calculates the revenue data to be distributed; (4) The marketing system writes the calculated revenue data to be distributed into a batch file and pushes it to the core system for processing; (5) After the core system processes the distribution revenue data, it writes the distribution results into the return file and pushes it to the marketing system; (6) The marketing system updates the local status and feeds back the processing results to the core system.
2. A method for processing real-time revenue distribution based on batch files according to claim 1, characterized in that: In step (1), the file stream is used to read the text data line by line, and the data storage process is started when a predetermined number of lines is reached.
3. The method for processing real-time revenue distribution based on batch files according to claim 1, characterized in that: In the step (1), data writing is performed in batches through MyBatis, and the data is written into the database in batches with a predetermined number of entries per batch.
4. The method for processing real-time revenue distribution based on batch files according to claim 1 is characterized in that: The step (2) further includes: acquiring data in pages, and using multiple threads to perform data comparison.
5. The method for processing real-time revenue distribution based on batch files according to claim 1 is characterized in that: In the step (3), when calculating the revenue, the order data related to the revenue date is read step by step from the database in a paging reading manner.
6. The method for processing real-time revenue distribution based on batch files according to claim 1, characterized in that: In step (4), the marketing system pushes the file containing the revenue data to be distributed to the designated path of the core system via FTP / SFTP or other secure protocols, and informs the core system that the file is ready via a real-time notification mechanism.
7. The method for processing real-time revenue distribution based on batch files according to claim 1, characterized in that: In step (5), the core system downloads the file and processes it after receiving the notification. After the processing is completed, the result file is pushed to the marketing system and the marketing system is notified that the processing is completed.
8. The method for processing real-time revenue distribution based on batch files according to claim 1, characterized in that: In step (6), the marketing system processes the file after receiving the return file, updates the status of the corresponding data in the local database, and feeds back the processing result to the core system.