Dynamic configuration-based batch deduction method, system and equipment and storage medium
By introducing a dynamic configuration database into the bank's deduction system and dynamically calling the configuration information of third-party companies to process the disk and return files, the problems of redundant code and inefficient batch deduction in traditional systems are solved, and an efficient and flexible deduction process is achieved.
Patent Information
- Application Number
- CN202411807357.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional bank batch deduction systems need to be customized to adapt to the incoming and returning file formats and business processes of different third-party companies, resulting in code redundancy and batch deduction efficiency.
Using a batch deduction method and system based on dynamic configuration, the configuration information of all third-party companies is stored through the dynamic configuration database, and the configuration information is called dynamically to generate and process the disk and return files to avoid customized development.
The standardized deduction process has been realized, which reduces code redundancy, improves the efficiency and development efficiency of bank deductions, and can flexibly respond to the needs of different third-party companies.
Smart Images

Figure CN119693110A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software design, and in particular to a batch deduction method, system, device and storage medium based on dynamic configuration. Background Art
[0002] Bank batch deduction is a way for banks to automatically deduct money from customer accounts. In the scenario of batch deduction for daily bill payment, customers need to sign contracts through mobile banking, counters, etc. After the contract is successfully signed, the three parties will regularly generate batch deduction files. The bank obtains the files to deduct money. After the deduction is completed, the return files of each deduction result will be generated and pushed to the three parties.
[0003] Since banks have many third-party companies to connect with and each of them has different processing methods for incoming and outgoing orders and business processes, the traditional connection method requires customized development for each new partner, which will result in high code redundancy and low efficiency of bank batch deductions. Summary of the invention
[0004] In order to improve the efficiency of bank batch deductions, the present application provides a batch deduction method, system, device and storage medium based on dynamic configuration.
[0005] In the first aspect, the present application provides a batch deduction method based on dynamic configuration, which adopts the following technical solution:
[0006] Receiving a batch deduction instruction from a third-party company, wherein the batch deduction instruction includes information of the third-party company and a batch deduction date;
[0007] Searching the configuration information of the third-party company in the dynamic configuration database according to the third-party company information, and reading the incoming and returned file configuration information in the configuration information, wherein the incoming and returned file configuration information includes an incoming target file name template and a third-party file server;
[0008] Obtaining a disk file name according to the batch deduction date and the disk target file name template, and acquiring the disk file through the third-party file server according to the disk file name and the configuration information;
[0009] Parse the incoming file according to the configuration information to generate a core batch file;
[0010] Deducting money according to the core batch deduction file and generating batch deduction result details;
[0011] Generate a return file with the batch deduction result details according to the configuration information, and send the return file to the third-party company.
[0012] Through the above technical solution, this application designs a standardized batch deduction process, and by setting up a dynamic configuration database containing the configuration information of all third-party companies in advance, it can be directly called when needed. There is no need to customize the batch deduction process for each new partner, which simplifies the code and improves development efficiency.
[0013] In a specific implementation scheme, the configuration information further includes a password of the third-party file server; and obtaining the incoming file through the third-party file server according to the incoming file name and the configuration information includes:
[0014] Acquiring file data from the third-party file server according to the passcode;
[0015] The incoming disk file is obtained in the file data according to the incoming disk file name.
[0016] Through the above technical solution, by configuring the access password of the third-party file server in advance, the bank can directly obtain the incoming file from the third-party server according to the incoming file name, thereby improving the batch deduction efficiency.
[0017] Through the above technical solution, by configuring the access password of the third-party file server in advance, the bank can directly obtain the incoming file from the third-party server according to the incoming file name, thereby improving the batch deduction efficiency.
[0018] In a specific implementation scheme, the configuration information also includes the incoming file type, the incoming file encoding format, the total number of transactions and the total amount configuration and the detailed information configuration; and the generation of the core batch deduction file by parsing the incoming file according to the configuration information includes:
[0019] Determine whether the incoming file type is excel or cvs;
[0020] If the incoming file type is excel or cvs type, use an excel parsing tool to parse the incoming file according to the encoding format of the incoming file to obtain a row data set;
[0021] Parse the row data set according to the total number of transactions and total amount configuration and the detailed information configuration to obtain the total number of transactions, total amount and detailed information, and assemble the total number of transactions, total amount and detailed information to generate a core batch deduction file;
[0022] If the incoming file type is not excel or cvs type, use a file parsing tool to parse the incoming file according to the incoming file encoding format to obtain a row data set;
[0023] According to the total number of transactions and total amount configuration, the row data set is parsed to obtain the total number of transactions and the total amount; according to the detailed information configuration, the row data set is parsed to obtain the detailed information; the total number of transactions, the total amount and the detailed information are assembled to generate a core batch deduction file.
[0024] Through the above technical solution, a universal incoming file parsing engine was designed to distinguish the incoming file types based on whether they are in table form. Universal batch deduction processes were designed for each file and corresponding core batch deduction files were generated, which streamlined the batch deduction process and improved the batch deduction efficiency.
[0025] In a specific possible implementation scheme, the configuration information further includes a fixed length of a disk field or a disk field separator; and the step of parsing the row data set according to the detailed information configuration to obtain detailed information includes:
[0026] Determining whether the incoming file is a fixed-length file according to the incoming file type;
[0027] If the incoming file is a fixed-length file, the row data set is parsed according to the detailed information configuration and the fixed length of the incoming field to obtain detailed information;
[0028] Otherwise, the row data set is parsed according to the detailed information configuration and the incoming disk field separator to obtain detailed information.
[0029] Through the above technical solution, when obtaining the details of batch deduction results, it is first distinguished whether the incoming file is a fixed-length file, and the fixed length of the incoming field or the incoming field separator is used to obtain the detailed information, which greatly improves the efficiency of bank batch deductions.
[0030] In a specific implementation scheme, the configuration information further includes a return file type, a return file configuration, and a return file format code; and generating a return file from the batch deduction result details according to the configuration information includes:
[0031] Determine whether the returned file type is excel or csv;
[0032] If the return file type is excel or csv type, the target field is obtained from the batch deduction result details according to the return file configuration;
[0033] Generate a return file using an excel generation tool according to the return file format code and the target field;
[0034] If the return file type is not excel or csv type, the target field is obtained from the batch deduction result details according to the return file configuration and a file generation tool is used to generate a return file according to the return file format code and the target field.
[0035] Through the above technical solution, a universal return file generation engine was designed, which distinguished the return file types based on whether they were in table form. Universal batch deduction processes were designed for each type, and corresponding return files were generated, which streamlined the batch deduction process and improved the batch deduction efficiency.
[0036] In a specific possible implementation scheme, the configuration information further includes a return field length or a return separator; and obtaining a target field from the batch deduction result details according to the return file configuration includes:
[0037] Determine whether the returned file type is a fixed-length file;
[0038] If the return file type is a fixed-length file, the target field is obtained from the batch deduction result details according to the return file configuration and the field length;
[0039] Otherwise, the target field is obtained from the batch deduction result details according to the return file configuration and the return separator.
[0040] Through the above technical solution, when obtaining the target field, it is first determined whether the return file required by the third-party company is a fixed-length file, and then the return field fixed length or return field separator is used to obtain detailed information, thereby improving the efficiency of return file generation and greatly improving the efficiency of bank batch deductions.
[0041] In a specific embodiment, the method further comprises:
[0042] When receiving a batch deduction instruction for a newly added third-party company, obtaining new configuration information of the newly added third-party company;
[0043] The new configuration information is added to the dynamic configuration database, and the dynamic configuration database is updated.
[0044] Through the above technical solution, when a batch deduction of a third-party company is added, the configuration information of the new third-party company is added to the dynamic configuration database, so that the dynamic configuration database is dynamically adjusted to enable the batch deduction process to run smoothly.
[0045] In a second aspect, the present application provides a batch buckle system based on dynamic configuration, which adopts the following technical solution: the system includes:
[0046] A batch deduction instruction receiving module is used to receive a batch deduction instruction from a third-party company, wherein the batch deduction instruction includes third-party company information and a batch deduction date;
[0047] A configuration information acquisition module searches for configuration information of a third-party company in the dynamic configuration database according to the third-party company information, and reads the incoming and returned file configuration information in the configuration information, wherein the incoming and returned file configuration information includes an incoming target file name template and a third-party file server;
[0048] An incoming file acquisition module obtains an incoming file name according to the batch deduction date and the incoming target file name template, and obtains the incoming file through the third-party file server according to the incoming file name and the configuration information;
[0049] A batch deduction file generation module, which parses the incoming disk file according to the configuration information to generate a core batch deduction file;
[0050] The bank batch deduction module deducts money according to the core batch deduction file and generates batch deduction result details;
[0051] The return file generation module generates a return file with the batch deduction result details according to the configuration information, and sends the return file to the third-party company.
[0052] In a third aspect, the present application provides a computer device, which adopts the following technical solution: it includes a memory and a processor, and the memory stores a computer program that can be loaded and executed by the processor such as the above-mentioned batch deduction method based on dynamic configuration.
[0053] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: storing a computer program that can be loaded by a processor and execute the above-mentioned batch deduction method based on dynamic configuration.
[0054] In summary, this application has the following beneficial technical effects:
[0055] (1) This application designs a standardized batch deduction process, and by setting up a dynamic configuration database containing the configuration information of all third-party companies in advance, it can be directly called when needed. There is no need to customize the batch deduction process for each new partner, which simplifies the code and improves the efficiency of bank batch deduction.
[0056] (2) This application designs a universal file parsing engine for parsing various file data. It can parse files of different formats according to configuration information to improve the efficiency of bank batch deductions.
[0057] (3) This application designs a universal file generation engine for generating various files. It can generate files of different types and encoding formats according to configuration information, thereby improving the efficiency of bank batch deductions.
[0058] (4) Set up a dynamic configuration database containing the configuration information of all third-party companies in advance. When a third-party company is added, update the dynamic configuration database in a timely manner. The dynamic configuration database is the basis for parsing incoming files and generating return files. Dynamic adjustments ensure the improvement of the bank batch deduction process. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a flow chart of a batch deduction method based on dynamic configuration in an embodiment of the present application.
[0060] Figure 2 It is a structural block diagram of a batch deduction method based on dynamic configuration in an embodiment of the present application.
[0061] Figure numerals: 201, batch deduction instruction receiving module; 202, configuration information acquisition module; 203, incoming file acquisition module; 204, batch deduction file generation module; 205, bank batch deduction module; 206, return file generation module. DETAILED DESCRIPTION
[0062] The following is combined with Figure 1-2 This application is described in further detail.
[0063] The embodiment of the present application discloses a batch deduction method based on dynamic configuration, which is used to improve the efficiency of bank batch deductions.
[0064] Bank batch deduction is a way for banks to automatically deduct money from customer accounts. In the scenario of batch deduction for daily bill payment, customers need to sign contracts through mobile banking, counters, etc. After the contract is successfully signed, the three parties will regularly generate batch deduction files. The bank obtains the files to deduct money. After the deduction is completed, the return files of each deduction result will be generated and pushed to the three parties.
[0065] Since banks have many third-party companies to connect with and each of them has different processing methods for incoming and outgoing orders and business processes, the traditional connection method requires customized development for each new partner, which will result in high code redundancy and low efficiency of bank batch deductions.
[0066] Therefore, the present application proposes a batch deduction method based on dynamic configuration, which is used to improve the efficiency of bank batch deductions.
[0067] like Figure 1 As shown, the method is based on a dynamic configuration database containing configuration information of a third-party company, and the method specifically includes the following steps:
[0068] S10, receiving a batch deduction instruction from a third-party company, where the batch deduction instruction includes the third-party company information and the batch deduction date.
[0069] Specifically, when the bank connects with a third-party company, the third-party company's configuration information will be stored in the dynamic configuration database, which contains the configuration information of all third-party companies. The third-party company sends a batch deduction instruction to the bank, which includes the third-party company information and the batch deduction date. After receiving the batch deduction instruction, the bank starts the batch deduction process.
[0070] S20, searching for configuration information of the third-party company in the dynamic configuration database according to the third-party company information, and reading the incoming and returned file configuration information in the configuration information, wherein the incoming and returned file configuration information includes an incoming target file name template and a third-party file server.
[0071] Specifically, the configuration information of the third-party company is searched in the dynamic configuration database according to the third-party company information such as the company name. The configuration information stores a lot of information, including the target file name template and the third-party file server. For example, the target file name template is the date + other fixed characters, and the third-party file server is displayed in the form of a third-party file server link.
[0072] S30, obtaining the incoming disk file name according to the batch deduction date and the incoming disk target file name template, and obtaining the incoming disk file through a third-party file server according to the incoming disk file name and configuration information.
[0073] Specifically, the disk file name is obtained according to the batch deduction date and the disk target file name template. For example, the disk target file name template is date + other fixed characters. The disk file name can be obtained by filling the batch deduction date into the template. At this time, the disk file preprocessing is also involved. For example, before obtaining the disk file, a notification of obtaining the disk file is sent to the third-party company to inform the third-party company in advance. Then, the disk file name is indexed, and the disk file is obtained from the third-party file server through configuration information. The disk file includes detailed information of specific batch deductions.
[0074] S40, generating a core batch file by parsing the disk file according to the configuration information.
[0075] Specifically, the present application designs a general incoming file parsing process, namely a file parsing engine, and its parsing process will be explained in detail below. The incoming file parsing process parses the incoming file according to the configuration information to generate a core batch file.
[0076] S50, deduct the money according to the core batch deduction file and generate the batch deduction result details.
[0077] Specifically, after the core batch deduction file is generated, the bank's core system interface is called to deduct funds. After the batch deduction transaction is completed, it is necessary to obtain all the detailed results of the batch deduction results from the bank system.
[0078] S60, generating a return file with the batch deduction result details according to the configuration information, and sending the return file to the third-party company.
[0079] Specifically, this application designs a general return file generation process, namely a return file generation engine, and its generation process will be explained in detail below. The return file generation process parses the batch deduction result details according to the configuration information to generate a return file, and the return file is sent to a third-party company to inform the batch deduction results.
[0080] This application designs a standardized batch deduction process, and by setting up a dynamic configuration database containing the configuration information of all third-party companies in advance, it can be directly called when needed. There is no need to customize the development of batch deduction processes for each new partner, which simplifies the code and improves the efficiency of bank batch deductions.
[0081] In one embodiment, in order to solve the problem that the bank cannot actively obtain the incoming file, resulting in low batch deduction efficiency, the step of obtaining the incoming file through a third-party file server according to the incoming file name and configuration information can be specifically performed as follows:
[0082] First, the file data of the third-party file server is obtained according to the passcode. Specifically, the bank can log in to the third-party file server according to the passcode in the configuration information reserved in advance by the customer, and obtain the file data in the third-party file server; then, the incoming disk file is obtained from the file data according to the incoming disk file name. Specifically, these file data are the sum of several file data, and the incoming disk file is obtained from the file data using the incoming disk file name as an index.
[0083] By configuring the password of the third-party file server in advance, the bank can directly obtain the incoming files from the third-party server according to the file name, thereby improving the efficiency of batch deduction.
[0084] In one embodiment, due to the variety of incoming file types, the traditional docking method requires customized batch deduction processes for each incoming file type of a third-party company, resulting in low batch deduction efficiency.
[0085] The configuration information also includes the incoming file type, the incoming file encoding format, the total number of transactions and the total amount configuration and the detailed information configuration. The step of parsing the incoming file according to the configuration information to generate the core batch deduction file can be specifically performed as follows:
[0086] First, determine whether the incoming file type is excel or cvs. Specifically, the configuration information will record the incoming file type in advance. The incoming file type generated by the third-party company is consistent with the configuration file record. The incoming file type is determined in order to use different parsing tools to distinguish the incoming file type based on whether it is in table form, and then design the corresponding parsing method.
[0087] If the incoming file type is excel or cvs type, use the excel parsing tool to parse the incoming file according to the incoming file encoding format to obtain a row data set. Specifically, the configuration information also includes the incoming file encoding format, such as GBK, UTF-8, etc. Use the excel parsing tool to parse the incoming file according to the incoming file encoding format to obtain a set of all the rows in the file, that is, a set of all the row data;
[0088] According to the total number of transactions and total amount configuration and the detailed information configuration, the row data set is parsed to obtain the total number of transactions, total amount and detailed information, and the total number of transactions, total amount and detailed information are assembled to generate the core batch deduction file. Specifically, the configuration information will record the row where the file header is located and the configuration of the file header. For example, the table file header is in the first row, and the configuration of the file header is the total number of transactions and total amount in sequence. The batch deduction result details include personnel, amount, and contract agreement number, etc. The configuration information will record the specific position of the total number of transactions and total amount in the file header, that is, the total number of transactions and total amount configuration. According to the total number of transactions and total amount configuration, the data in the table is parsed to obtain the total number of transactions and total amount. Similarly, the configuration information will record the specific position of the detailed information in the file, that is, the detailed information configuration, and the detailed information is obtained according to the detailed information configuration. The total number of transactions, total amount and detailed information obtained here are in the form of fields, and the total number of transactions, total amount and detailed information are assembled to obtain the core batch deduction file.
[0089] If the incoming file type is not excel or cvs, use the file parsing tool to parse the incoming file according to the incoming file encoding format to obtain a row data set. Specifically, if the incoming file type is not excel or cvs, but other types such as txt, the configuration information also includes the incoming file encoding format, such as GBK, UTF-8 and other types. Use the file parsing tool to parse the incoming file according to the incoming file encoding format to obtain a set of all file rows, that is, a set of all row data.
[0090] According to the total number of transactions and total amount configuration, the row data set is parsed to obtain the total number of transactions and total amount. According to the detailed information configuration, the row data set is parsed to obtain the detailed information. The total number of transactions, total amount and detailed information are assembled to generate the core batch deduction file. Specifically, the configuration information will record the row where the file header is located and the configuration of the file header. The configuration information will record the specific location of the total number of transactions and total amount in the file header, that is, the total number of transactions and total amount configuration. According to the total number of transactions and total amount configuration, the data in the table is parsed to obtain the total number of transactions and total amount. The total number of transactions and total amount are single data and easy to obtain, so the total number of transactions and total amount are obtained first. The detailed information includes the personnel, amount, and contract agreement number of each order, which need to be obtained one by one. The configuration information will record the specific location of the detailed information in the file, that is, the detailed information configuration. According to the detailed information configuration, the detailed information is obtained. The total number of transactions, total amount and detailed information obtained here are also in the form of fields. The total number of transactions, total amount and detailed information need to be assembled to obtain the core batch deduction file.
[0091] This application designs a universal incoming file parsing engine, which distinguishes the types of incoming files based on whether they are in table format, designs universal batch deduction processes respectively, and generates corresponding core batch deduction files, so as to streamline the batch deduction process and improve the batch deduction efficiency.
[0092] In one embodiment, the configuration information further includes a fixed length of the disk field or a disk field separator. The step of parsing the row data set to obtain the detailed information according to the detailed information configuration can be specifically performed as follows:
[0093] Determine whether the incoming file is a fixed-length file based on the file type. Specifically, the characteristics of a fixed-length file are that the length of the fields in each line is the same, there is no separator between fields, and each field occupies a fixed-length position, thus forming an overall structured data record. The method of obtaining detailed information varies depending on whether the incoming file is a fixed-length file, so first determine whether the incoming file is a fixed-length file. The file type is recorded in the configuration information, and the third-party company will generate a file of the corresponding type based on the configuration information.
[0094] If the incoming file is a fixed-length file, the detailed information is obtained by parsing the row data set according to the detailed information configuration and the fixed length of the incoming field. Specifically, taking the signing agreement number information as an example, the detailed information configuration will record the location of the signing agreement number information, such as the third line of the file. When retrieving the data in the row data set, the fixed field length of the signing agreement number will be agreed upon in the configuration information. You only need to truncate the fields in the row data according to the fixed field length to obtain several signing agreement numbers.
[0095] Otherwise, the detailed information is obtained by parsing the row data set according to the detailed information configuration and the incoming disk field delimiter. Specifically, if the incoming disk file is a non-fixed-length file, taking the personnel information of each order as an example, the location of the personnel information will be recorded in the detailed information configuration, such as the 4th line of the file. The row data is retrieved in the row data set. The delimiter of the personnel information will be agreed upon in the configuration information. The fields in the row data are intercepted according to the delimiter to obtain some personnel information.
[0096] By judging whether the incoming file is a fixed-length file, it is only necessary to use the fixed length of the incoming field or the separator of the incoming field to obtain the detailed information, which greatly improves the efficiency of bank batch deduction.
[0097] In one embodiment, the types of return documents required by third-party companies are diverse. The traditional docking method requires customized return document generation process for each return document type of the third-party company, and the batch deduction efficiency is low.
[0098] The configuration information also includes the return file type, return file configuration and return file format code; the step of generating a return file from the batch deduction result details according to the configuration information can be specifically performed as follows:
[0099] Determine whether the return file type is excel or csv. Specifically, the configuration information will record the return file type required by the customer in advance. The purpose of determining the return file type is to use different generation tools to distinguish the return file type based on whether it is in table form, and then design the corresponding generation method.
[0100] If the return file type is excel or csv, the target field is obtained from the batch deduction result details according to the return file configuration. Specifically, the file header title and header data are generated according to the return file configuration settings, the target information that needs to be filled in each position of the table is clarified, the target field is obtained from the batch deduction result details according to the target information, and the target information is sorted according to its position in the table.
[0101] Use the Excel generation tool to generate a return file according to the return file format encoding and target field. Specifically, the configuration information also includes the return file encoding format, such as GBK, UTF-8 and other types. Use the Excel generation tool to configure the target information into the table according to the return file encoding format to generate the return file.
[0102] If the return file type is not excel or csv, the target field is obtained from the batch deduction result details according to the return file configuration, and the file generation tool is used to generate the return file according to the return file format code and the target field. Specifically, the return file configuration clearly defines the target information that needs to be filled in each position of the file, and the target field is obtained from the batch deduction result details according to the target information. The file generation tool is used to configure the target information into the file according to the return file coding format to generate the return file.
[0103] Through the above technical solution, a universal return file generation engine was designed, which distinguished the return file types based on whether they were in table form. Universal batch deduction processes were designed for each type, and corresponding return files were generated, which streamlined the batch deduction process and improved the batch deduction efficiency.
[0104] In one embodiment, in order to improve the efficiency of bank batch deduction, the configuration information also includes the return field length or the return separator; the step of obtaining the target field from the batch deduction result details according to the return file configuration can be specifically performed as follows:
[0105] Determine whether the return file type is a fixed-length file. Specifically, the method of obtaining the target field from the batch deduction result details varies depending on whether the return file is a fixed-length file. Therefore, you must first determine whether the return file is a fixed-length file. The configuration information records the file type, and the bank will generate a file of the corresponding type based on the configuration information.
[0106] If the return file type is a fixed-length file, the target field is obtained from the batch deduction result details based on the return file configuration and field length. Specifically, taking the batch deduction result information as an example, the return file configuration will record the location of the batch deduction result information, such as the third line of the file. The batch deduction result information is retrieved from the batch deduction result details. The fixed field length of the batch deduction result is agreed upon in the configuration information. Several batch deduction result information are arranged according to the fixed field length to obtain the target field corresponding to the batch deduction result.
[0107] Otherwise, the target field is obtained from the batch deduction result details according to the return file configuration and the return delimiter. Taking the batch deduction result information as an example, the return file configuration will record the location of the batch deduction result information, such as the third line of the file, and the batch deduction result information is retrieved from the batch deduction result details. Since the field lengths of the batch deduction results are different, the delimiter of the batch deduction results will be agreed upon in the configuration information. Several batch deduction result information are arranged according to the delimiter to obtain the target field corresponding to the batch deduction result.
[0108] By determining whether the return file required by the third-party company is a fixed-length file, it is only necessary to use the fixed-length return field or the return field separator to obtain detailed information, thereby improving the efficiency of return file generation and greatly improving the efficiency of bank batch deductions.
[0109] In one embodiment, in order to improve the batch deduction efficiency, the method may further perform the following steps:
[0110] When a batch deduction instruction from a newly added third-party company is received, new configuration information of the newly added third-party company is obtained; the new configuration information is added to the dynamic configuration database, and the dynamic configuration database is updated. Specifically, when a newly added third-party company needs to go through a batch deduction process at the bank, the dynamic configuration database does not have the company's configuration information, and it is necessary to first obtain the company's configuration information and update it in the dynamic configuration database. The bank then performs batch deductions according to the standardized deduction process of this application.
[0111] It should be noted that if the configuration information of a third-party company needs to be modified, the dynamic configuration database needs to be modified according to the modified information before the next batch deduction to ensure a smooth batch deduction process.
[0112] Based on the above method, the present application also discloses a batch buckle system based on dynamic configuration. Figure 2 The system includes the following modules:
[0113] The batch deduction instruction receiving module 201 is used to receive the batch deduction instruction of the third party company, and the batch deduction instruction includes the third party company information and the batch deduction date;
[0114] The configuration information acquisition module 202 searches for the configuration information of the third-party company in the dynamic configuration database according to the third-party company information, and reads the incoming and returned file configuration information in the configuration information, wherein the incoming and returned file configuration information includes the incoming target file name template and the third-party file server;
[0115] The incoming file acquisition module 203 obtains the incoming file name according to the batch deduction date and the incoming file target file name template, and obtains the incoming file through the third-party file server according to the incoming file name and configuration information;
[0116] The batch deduction file generation module 204 generates a core batch deduction file according to the configuration information parsing disk file;
[0117] The bank batch deduction module 205 deducts money according to the core batch deduction file and generates a batch deduction result detail;
[0118] The return file generation module 206 generates a return file with the batch deduction result details according to the configuration information, and sends the return file to the third-party company.
[0119] In one embodiment, the configuration information acquisition module 202 is specifically configured to acquire file data of a third-party file server according to a passcode; and acquire an incoming file according to an incoming file name in the file data.
[0120] In one embodiment, the batch deduction file generation module 204 is specifically used to determine whether the incoming file type is an Excel or CVS type; if the incoming file type is an Excel or CVS type, then use an Excel parsing tool to parse the incoming file according to the incoming file encoding format to obtain a row data set; parse the row data set according to the total number of transactions and total amount configuration and the detailed information configuration to obtain the total number of transactions, total amount and detailed information, and assemble the total number of transactions, total amount and detailed information to generate a core batch deduction file; if the incoming file type is not an Excel or CVS type, then use a file parsing tool to parse the incoming file according to the incoming file encoding format to obtain a row data set; parse the row data set according to the total number of transactions and total amount configuration to obtain the total number of transactions and total amount, parse the row data set according to the detailed information configuration to obtain detailed information, and assemble the total number of transactions, total amount and detailed information to generate a core batch deduction file.
[0121] In one embodiment, the batch file generation module 204 is specifically used to determine whether the incoming file is a fixed-length file based on the incoming file type; if the incoming file is a fixed-length file, the row data set is parsed according to the detailed information configuration and the fixed length of the incoming field to obtain the detailed information; otherwise, the row data set is parsed according to the detailed information configuration and the incoming field separator to obtain the detailed information.
[0122] In one embodiment, the return file generation module 206 is specifically used to determine whether the return file type is excel or csv type; if the return file type is excel or csv type, then obtain the target field from the batch deduction result details according to the return file configuration; use the excel generation tool to generate the return file according to the return file format code and the target field; if the return file type is not excel or csv type, then obtain the target field from the batch deduction result details according to the return file configuration and use the file generation tool to generate the return file according to the return file format code and the target field.
[0123] In one embodiment, the return file generation module 206 is specifically used to determine whether the return file type is a fixed-length file; if the return file type is a fixed-length file, the target field is obtained from the batch deduction result details according to the return file configuration and the field length; otherwise, the target field is obtained from the batch deduction result details according to the return file configuration and the return separator.
[0124] The embodiment of the present application also discloses a computer device.
[0125] Specifically, the computer device includes a memory and a processor, and the memory stores a computer program that can be loaded by the processor and execute the above-mentioned batch deduction method based on dynamic configuration.
[0126] The embodiment of the present application also discloses a computer-readable storage medium.
[0127] Specifically, the computer-readable storage medium stores a computer program that can be loaded by a processor and execute the batch deduction method based on dynamic configuration as described above. The computer-readable storage medium includes, for example: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0128] This specific embodiment is merely an explanation of the present invention and is not a limitation of the present invention. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed. However, as long as they are within the scope of the claims of the present invention, they are protected by the patent law.
Claims
1. A batch buckle method based on dynamic configuration, characterized in that: The method is based on a dynamic configuration database containing configuration information of a third-party company, and the method comprises: Receiving a batch deduction instruction from a third-party company, wherein the batch deduction instruction includes information of the third-party company and a batch deduction date; Searching the configuration information of the third-party company in the dynamic configuration database according to the third-party company information, and reading the incoming and returned file configuration information in the configuration information, wherein the incoming and returned file configuration information includes an incoming target file name template and a third-party file server; Obtaining a disk file name according to the batch deduction date and the disk target file name template, and acquiring the disk file through the third-party file server according to the disk file name and the configuration information; Parse the incoming file according to the configuration information to generate a core batch file; Deducting money according to the core batch deduction file and generating batch deduction result details; Generate a return file with the batch deduction result details according to the configuration information, and send the return file to the third-party company.
2. The method according to claim 1, characterized in that: The configuration information also includes a password for the third-party file server; and obtaining the incoming file through the third-party file server according to the incoming file name and the configuration information includes: Acquiring file data from the third-party file server according to the passcode; The incoming disk file is obtained in the file data according to the incoming disk file name.
3. The method according to claim 1, characterized in that: The configuration information also includes the incoming file type, the incoming file encoding format, the total number of transactions and the total amount configuration and the detailed information configuration; the generation of the core batch deduction file by parsing the incoming file according to the configuration information includes: Determine whether the incoming file type is excel or cvs; If the incoming file type is excel or cvs type, use an excel parsing tool to parse the incoming file according to the encoding format of the incoming file to obtain a row data set; Parse the row data set according to the total number of transactions and total amount configuration and the detailed information configuration to obtain the total number of transactions, total amount and detailed information, and assemble the total number of transactions, total amount and detailed information to generate a core batch deduction file; If the incoming file type is not excel or cvs type, use a file parsing tool to parse the incoming file according to the incoming file encoding format to obtain a row data set; According to the total number of transactions and total amount configuration, the row data set is parsed to obtain the total number of transactions and the total amount; according to the detailed information configuration, the row data set is parsed to obtain the detailed information; the total number of transactions, the total amount and the detailed information are assembled to generate a core batch deduction file.
4. The method according to claim 3, characterized in that: The configuration information also includes a fixed length of the disk field or a disk field separator; and the detailed information obtained by parsing the row data set according to the detailed information configuration includes: Determining whether the incoming file is a fixed-length file according to the incoming file type; If the incoming file is a fixed-length file, the row data set is parsed according to the detailed information configuration and the fixed length of the incoming field to obtain detailed information; Otherwise, the row data set is parsed according to the detailed information configuration and the incoming disk field separator to obtain detailed information.
5. The method according to claim 1, characterized in that: The configuration information also includes the return file type, return file configuration and return file format code; Generating a return file with the batch deduction result details according to the configuration information includes: Determine whether the returned file type is excel or csv; If the return file type is excel or csv type, the target field is obtained from the batch deduction result details according to the return file configuration; Generate a return file using an excel generation tool according to the return file format code and the target field; If the return file type is not excel or csv type, the target field is obtained from the batch deduction result details according to the return file configuration and a file generation tool is used to generate a return file according to the return file format code and the target field.
6. The method according to claim 5, characterized in that: The configuration information also includes the return field length or the return separator; the step of obtaining the target field from the batch deduction result details according to the return file configuration includes: Determine whether the returned file type is a fixed-length file; If the return file type is a fixed-length file, the target field is obtained from the batch deduction result details according to the return file configuration and the field length; Otherwise, the target field is obtained from the batch deduction result details according to the return file configuration and the return separator.
7. The method according to claim 1, characterized in that: The method further comprises: When receiving a batch deduction instruction for a newly added third-party company, obtaining new configuration information of the newly added third-party company; The new configuration information is added to the dynamic configuration database, and the dynamic configuration database is updated.
8. A batch buckle system based on dynamic configuration, characterized in that: The system comprises: A batch deduction instruction receiving module (201) is used to receive a batch deduction instruction from a third-party company, wherein the batch deduction instruction includes information about the third-party company and a batch deduction date; A configuration information acquisition module (202) searches the dynamic configuration database for configuration information of a third-party company according to the third-party company information, wherein the configuration information includes a target file name template and a third-party file server; An incoming file acquisition module (203) searches for configuration information of a third-party company in the dynamic configuration database according to the third-party company information, and reads incoming and returned file configuration information in the configuration information, wherein the incoming and returned file configuration information includes an incoming target file name template and a third-party file server; A batch deduction file generation module (204) is used to parse the incoming file according to the configuration information to generate a core batch deduction file; The bank batch deduction module (205) deducts money according to the core batch deduction file and generates a batch deduction result detail; A return file generation module (206) generates a return file from the batch deduction result details according to the configuration information, and sends the return file to the third-party company.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and system for processing service data
CN101706932A
Batch money deduction method and device, storage medium and electronic equipment
CN115187232A