Bank peripheral system text file loading method and device
Through the method of file loading configuration table, text files of bank peripheral systems are screened and loaded, which solves the difficult screening problems caused by large amounts of data, complex structures, and diverse formats, achieves flexibility and high availability, and ensures data integrity and consistency.
Patent Information
- Application Number
- CN202111134907.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-27
- Publication Date
- 2024-10-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The bank's peripheral system cannot effectively filter out the required text data due to the large amount of file data, complex data structure, and diverse formats downloaded from the core system.
Adopt a method based on the file loading configuration table to receive the original file issued by the core system, obtain the file loading configuration table, determine the loading conditions including the specified text type, source path, warehousing command and filtering conditions, and read the file from the specified source through the file reading module Take out the preliminary file from the path, and execute the warehousing command according to the filtering conditions to load the required text into the target database table.
It realizes the need to flexibly respond to changes in the interfaces of the bank's core system and peripheral systems, has high availability and flexibility, solves the screening difficulties caused by large amounts of data, complex structures, and diverse formats, and ensures the integrity and consistency of the data.
Smart Images

Figure CN113778563B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed technology, and in particular to a method and device for loading text files in a bank peripheral system. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] In the banking architecture, much of the data between the bank's core system and peripheral systems is not synchronized in real time. Therefore, in order to achieve non-real-time data synchronization between the core system and the peripheral system, most of the data is transmitted from the core system to the peripheral system in the form of text files, such as balance information, transaction information, fee information, account change notifications, etc. The text files transmitted from the core system usually have large data volumes, complex data structures, and various formats. Therefore, for the peripheral system, how to load these text files and select the data required by the system is also a difficulty. Summary of the invention
[0004] The embodiment of the present invention provides a method for loading text files in a bank peripheral system, which is used to solve the problem that the current bank peripheral system cannot filter out the text required by the system due to the large amount of file text data, complex data structure and various formats downloaded from the core system. The method includes:
[0005] Receive the original file sent by the core system and obtain the file loading configuration table;
[0006] Determine the loading conditions according to the file loading configuration table, wherein the loading conditions include the specified text type to be loaded, the specified text source path, the storage command, the screening conditions, and the target database table for storing the required text;
[0007] Extract the preliminary selected files of the specified text type from the original files sent from the specified text source path;
[0008] Filter the required text from the preliminary selection file according to the screening conditions, execute the import command, and load the required text into the target database table.
[0009] The embodiment of the present invention also provides a text file loading device for a bank peripheral system, which is used to solve the problem that the current bank peripheral system cannot filter out the text required by the system due to the large amount of file text data, complex data structure and various formats downloaded from the core system. The device includes:
[0010] The communication module is used to receive the original file sent by the core system and obtain the file loading configuration table;
[0011] A determination module is used to determine the loading conditions according to the file loading configuration table, wherein the loading conditions include the specified text type to be loaded, the specified text source path, the storage command, the screening conditions, and the target database table for storing the required text;
[0012] A file reading module is used to retrieve a preliminary file of a specified text type from the original file sent from the specified text source path;
[0013] The screening module is used to screen the required text from the preliminary selection files according to the screening conditions, execute the storage command, and load the required text into the target database table.
[0014] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned bank peripheral system text file loading method when executing the computer program.
[0015] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above-mentioned bank peripheral system text file loading method.
[0016] In the embodiment of the present invention, a file loading method based on a file loading configuration table is provided, which can dynamically configure the content of the file loading configuration table, wherein the fields such as the specified text type, the specified text source path, the screening condition and the target database table can be configured according to the requirements. After the file loading configuration table is configured, the loading condition can be determined according to the file loading configuration table, and the original file sent by the core system can be screened and stored according to the loading condition, so as to achieve flexible response to the interface changes of the bank core system and the demand changes of the peripheral system, with high availability and flexibility, and solve the problem that the current bank peripheral system cannot screen out the text required by the system due to the large amount of file text data, complex data structure and various formats transmitted by the core system. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0018] Figure 1 It is a flow chart of a method for loading text files into a bank peripheral system in an embodiment of the present invention;
[0019] Figure 2It is a flow chart of a method for loading a text file of a bank peripheral system for a transaction information text according to an embodiment of the present invention;
[0020] Figure 3 It is a flow chart of a method for executing a text file loading method of a bank peripheral system for an account parameter information text according to an embodiment of the present invention;
[0021] Figure 4 It is a flow chart of a method for loading a text file of a bank peripheral system for a deposit overdraft history text in an embodiment of the present invention;
[0022] Figure 5 This is a structural schematic diagram of a text file loading device for a bank peripheral system according to an embodiment of the present invention;
[0023] Figure 6 The figure is a schematic diagram of the structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION
[0024] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0025] The embodiment of the present invention provides a method for loading text files in a bank peripheral system, such as Figure 1 As shown, the method includes steps 101 to 104:
[0026] Step 101: Receive the original file sent by the core system and obtain the file loading configuration table.
[0027] For example, the following table 1 shows a file loading configuration table:
[0028] Table 1
[0029]
[0030]
[0031] The number of file waiting times is used to indicate the number of times the file loading instruction is executed while the file is waiting to be loaded. The crontab is configured to run the file loading instruction every 3 minutes. After the previous file loading instruction is executed, the file loading instruction will be executed again after waiting for 3 minutes. Each file loading instruction is executed starting from step 101.
[0032] The result text is used to store the required text after the screening is completed. The RES_FILE field in Table 1 records the name of the result text. When the required text is loaded into the target database table, the required text is read from the result text.
[0033] The control script, i.e. the control script for database entry, is used to control which fields are entered into the database. Since some fields are not required by the peripheral system, other fields except those recorded in the control script are not loaded into the database.
[0034] Table name, that is, the target database table name.
[0035] The incremental full flag is used to control whether to load incrementally or fully.
[0036] The number of screenings is used to record the number of screenings required. Specifically, the number of screenings = 0 means no screening is required; the number of screenings = 1 means one screening; the number of screenings = 2 means two screenings; if two screenings are required, two records are configured in the text loading configuration table.
[0037] Since the number of original files sent by the core system is large and complex, after receiving the original files sent by the core system, you can first check the format and status of each file in the original file, and execute the subsequent steps when the check passes. Specifically, checking the file format means checking whether the file name is correct; checking the file status is used to check whether the text has reached the peripheral system. When the status is 0, it means it has not arrived, and when the status is 1, it means it has arrived. If the status is 1-arrived, then the next step can be performed on the file.
[0038] Step 102: Determine the loading conditions according to the file loading configuration table. The loading conditions include the specified text type to be loaded, the specified text source path, the storage command, the screening conditions, and the target database table storing the required text.
[0039] Taking the file loading configuration table in Table 1 as an example, specify the text type, that is, the text type recorded in the FILE_TYPE field in Table 1; specify the text source path, that is, the distribution system recorded in SYS_ID, the distribution path recorded in FILES_PATH, and the bank number recorded in BANK_NO in Table 1; the target database table is determined according to the table name recorded in TAB_NAME in Table 1.
[0040] The import command is used to instruct to load a text file into the database.
[0041] The filter condition is used to indicate the conditions by which the text is filtered. The filter conditions include account filter conditions, customer number filter conditions, one-stop account filter conditions, loan account filter conditions, etc., which are used to indicate how to filter the account, customer number, one-stop account, loan account, etc. For example, the account in the core system may not exist in the peripheral system, so all the accounts in the peripheral system are placed in the filter condition A, and the text of record A is read during the filtering, so that the required accounts in the peripheral system can be filtered out, and the accounts that do not exist in the peripheral system can be filtered out.
[0042] It should be noted that the screening conditions can be configured by the staff according to the text required in the peripheral system, and are not limited to the above-mentioned accounts, customer numbers, one-account accounts, and loan accounts.
[0043] Step 103: extract a preliminary selected file of a specified text type from the original file sent from the specified text source path.
[0044] Step 104: Filter the required text from the preliminary selection file according to the screening conditions, execute the storage command, and load the required text into the target database table.
[0045] The filter condition includes filter conditions corresponding to different filter times, including zero, one, and two. For different text types, the required filter times may be different. For example, the transaction information text needs to be filtered twice; the account parameter information text needs to be filtered zero times; and the deposit overdraft history text needs to be filtered once.
[0046] When the number of screenings recorded in the file record configuration table is two, the screening conditions include a primary screening condition and a secondary screening condition, then step 104 screens the required text from the primary selection file according to the screening condition, executes the storage command, and loads the required text into the target database table, which can be executed as the following steps 1041 and 1042:
[0047] Step 1041, decompress the primary selected file to obtain the original text;
[0048] Step 1042: Filter the first text from the original text according to the primary filtering condition, execute the storage command, and load the first text into the target database table.
[0049] After executing step 1042 to load the first text into the target database table, the following steps 201 to 203 may also be executed:
[0050] Step 201, filtering the second text from the first text according to the secondary filtering condition;
[0051] Step 202, loading the second text into the full scale;
[0052] Step 203: Update the target database table according to the preset rules and the full table.
[0053] Among them, updating includes modification and deletion.
[0054] Taking transaction information text as an example, the first text recording transaction information is loaded into tables A, B, and C in the peripheral system. After the second text is loaded into the full table, it is necessary to update the expenditure amount, number of transactions and other fields in tables A, B, and C according to the information recorded in the full table to ensure the uniformity of the information recorded in tables A, B, and C for each transaction.
[0055] For another example, if some accounts are closed, these closed accounts can no longer be displayed in the report statistics. Therefore, according to the records of the full table, the information about the closed accounts in Tables A and B that record the closed accounts will be deleted.
[0056] In an embodiment of the present invention, after the secondary screening condition screening, the obtained second text can be recorded in the result text recording the name in Table 1, and then the text is read from the result text and loaded into the full table.
[0057] As shown in Table 1, the file loading configuration table also configures whether sqlldr is allowed to report errors. If sqlldr is allowed to report errors, when an error occurs when loading text, the text currently being loaded and the target database table corresponding to the text are recorded, and the text currently being loaded is determined as abnormal data; revisions to the abnormal data are received; the correspondence between the revised abnormal data and the corresponding target database table is stored in a designated folder; the revised abnormal data in the designated folder is read using a timing program, and the revised abnormal data is loaded into the corresponding target database table.
[0058] The revision of abnormal data can be manual revision. Revision and supplementation of abnormal data (ie, reloading to the target database table) has high reliability, so that the text loaded into the target database table is complete, thereby ensuring strong consistency of data.
[0059] To further enhance data consistency, after the required text is loaded into the target database table, a consistency check can be performed between the data loaded into the target database table and the required text obtained by filtering according to the filtering conditions.
[0060] In the embodiment of the present invention, the transaction information text, account parameter information text, and deposit overdraft history text with different screening times are taken as examples to introduce the bank peripheral system text file loading method executed by the text with different screening times. Figure 2 , which is a flowchart of a method for loading text files from a bank peripheral system for transaction information text; see Figure 3, which is a flowchart of a method for loading a text file of a bank peripheral system for an account parameter information text; see Figure 4 , which is a flow chart of a method for loading text files from a bank peripheral system for deposit overdraft history texts.
[0061] In the embodiment of the present invention, a file loading method based on a file loading configuration table is provided, which can dynamically configure the content of the file loading configuration table, wherein the fields such as the specified text type, the specified text source path, the screening condition and the target database table can be configured according to the requirements. After the file loading configuration table is configured, the loading condition can be determined according to the file loading configuration table, and the original file sent by the core system can be screened and stored according to the loading condition, so as to achieve flexible response to the interface changes of the bank core system and the demand changes of the peripheral system, with high availability and flexibility, and solve the problem that the current bank peripheral system cannot screen out the text required by the system due to the large amount of file text data, complex data structure and various formats transmitted by the core system.
[0062] The present invention also provides a bank peripheral system text file loading device, as described in the following embodiments. Since the principle of the device to solve the problem is similar to the bank peripheral system text file loading method, the implementation of the device can refer to the implementation of the bank peripheral system text file loading method, and the repeated parts will not be repeated.
[0063] like Figure 5 As shown, the device 500 includes a communication module 501 , a determination module 502 , a file reading module 503 and a screening module 504 .
[0064] The communication module 501 is used to receive the original file sent by the core system and obtain the file loading configuration table;
[0065] The determination module 502 is used to determine the loading conditions according to the file loading configuration table, and the loading conditions include the specified text type to be loaded, the specified text source path, the storage command, the screening conditions and the target database table for storing the required text;
[0066] The file reading module 503 is used to retrieve a preliminary selected file of a specified text type from the original file sent from the specified text source path;
[0067] The screening module 504 is used to screen the required text from the preliminary selection files according to the screening conditions, execute the storage command, and load the required text into the target database table.
[0068] In an implementation of the embodiment of the present invention, the screening condition includes screening conditions corresponding to different screening times, and the screening times include zero times, one time, and two times; when the screening times is two times, the screening condition includes a primary screening condition and a secondary screening condition, and the screening module is used to:
[0069] Decompress the primary selection file to obtain the original text;
[0070] Filter the first text from the original text according to the primary screening condition, execute the storage command, and load the first text into the target database table;
[0071] The filter module is also used to:
[0072] filtering the second text from the first text according to the secondary filtering condition;
[0073] Load the second text into the full scale;
[0074] Update the target database table according to the preset rules and the full table.
[0075] In an implementation manner of the embodiment of the present invention, the device further includes an error processing module, which is used to:
[0076] When an error occurs while loading text, the text currently being loaded and the target database table corresponding to the text are recorded, and the text currently being loaded is determined as abnormal data;
[0077] Receive revisions to anomalous data;
[0078] Store the revised abnormal data and the corresponding target database table in a specified folder;
[0079] The revised abnormal data in the specified folder is read by the timing program, and the revised abnormal data is loaded into the corresponding target database table.
[0080] In one implementation of the embodiment of the present invention, the device further includes:
[0081] The consistency check module is used to check the consistency between the data loaded into the target database table and the required text obtained by filtering according to the filtering conditions.
[0082] In the embodiment of the present invention, a file loading method based on a file loading configuration table is provided, which can dynamically configure the content of the file loading configuration table, wherein the fields such as the specified text type, the specified text source path, the screening condition and the target database table can be configured according to the requirements. After the file loading configuration table is configured, the loading condition can be determined according to the file loading configuration table, and the original file sent by the core system can be screened and stored according to the loading condition, so as to achieve flexible response to the interface changes of the bank core system and the demand changes of the peripheral system, with high availability and flexibility, and solve the problem that the current bank peripheral system cannot screen out the text required by the system due to the large amount of file text data, complex data structure and various formats transmitted by the core system.
[0083] An embodiment of the present invention further provides a computer device, Figure 6 This is a schematic diagram of a computer device in an embodiment of the present invention. The computer device can implement all the steps in the bank peripheral system text file loading method in the above embodiment. The computer device specifically includes the following contents:
[0084] Processor (processor) 601, memory (memory) 602, communication interface (CommunicationsInterface) 603 and communication bus 604;
[0085] The processor 601, the memory 602, and the communication interface 603 communicate with each other through the communication bus 604; the communication interface 603 is used to realize information transmission between related devices;
[0086] The processor 601 is used to call the computer program in the memory 602, and when the processor executes the computer program, the bank peripheral system text file loading method in the above embodiment is implemented.
[0087] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above-mentioned bank peripheral system text file loading method.
[0088] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0089] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0090] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0092] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for loading text files in a bank peripheral system, characterized in that: The method comprises: Receive the original file sent by the core system and obtain the file loading configuration table; Determine the loading conditions according to the file loading configuration table, wherein the loading conditions include the specified text type to be loaded, the specified text source path, the storage command, the screening conditions, and the target database table for storing the required text; Extract the preliminary selected files of the specified text type from the original files sent from the specified text source path; Filter the required text from the preliminary selection file according to the screening conditions, execute the import command, and load the required text into the target database table; The screening conditions include account screening conditions, customer number screening conditions, one-stop account screening conditions, and loan account screening conditions, which are used to indicate how to screen the account number, customer number, one-stop account number, and loan account number respectively; screening required text from the preliminary selection file according to the screening conditions includes: putting all the accounts in the peripheral system in the screening condition A, reading the text of record A during screening, screening out the required accounts in the peripheral system, and filtering out the accounts that do not exist in the peripheral system; The screening condition includes screening conditions corresponding to different screening times, and the screening times include zero, one and two times; when the screening times is two times, the screening condition includes a primary screening condition and a secondary screening condition, and the required text is screened from the primary selection file according to the screening condition, and the storage command is executed to load the required text into the target database table, including: decompressing the primary selection file to obtain the original text; screening the first text from the original text according to the primary screening condition, executing the storage command, and loading the first text into the target database table; after the first text is loaded into the target database table, the method further includes: screening the second text from the first text according to the secondary screening condition; loading the second text into the full table; updating the target database table according to the preset rules and the full table; Filter the required text from the preliminary file according to the screening conditions, execute the warehousing command, and load the required text into the target database table, including: loading the first text recording the transaction information into tables A, B, and C in the peripheral system, and after the second text is loaded into the full table, updating the expenditure amount and transaction number fields in tables A, B, and C according to the information recorded in the full table; if the account is closed, according to the records of the full table, delete the information about the closed account in tables A and B recording the closed account; after the second screening condition is filtered, record the obtained second text into the result text recording the name in the file loading configuration table, read the text from the result text and load it into the full table; the result text is used to store the required text after the screening is completed.
2. The method according to claim 1, characterized in that The method further comprises: When an error occurs while loading text, the text currently being loaded and the target database table corresponding to the text are recorded, and the text currently being loaded is determined as abnormal data; Receive revisions to anomalous data; Store the revised abnormal data and the corresponding target database table in a specified folder; The revised abnormal data in the specified folder is read by the timing program, and the revised abnormal data is loaded into the corresponding target database table.
3. The method according to claim 2, characterized in that After loading the required text into the target database table, the method further includes: Check the consistency between the data loaded into the target database table and the required text obtained by filtering according to the filtering conditions.
4. A text file loading device for a bank peripheral system, characterized in that: The device comprises: The communication module is used to receive the original file sent by the core system and obtain the file loading configuration table; A determination module is used to determine the loading conditions according to the file loading configuration table, wherein the loading conditions include the specified text type to be loaded, the specified text source path, the storage command, the screening conditions, and the target database table for storing the required text; A file reading module is used to retrieve a preliminary file of a specified text type from the original file sent from the specified text source path; The screening module is used to screen the required text from the preliminary selection files according to the screening conditions, execute the storage command, and load the required text into the target database table; The screening conditions include account screening conditions, customer number screening conditions, one-stop account screening conditions, and loan account screening conditions, which are respectively used to indicate how to screen the account, customer number, one-stop account, and loan account; the screening module is specifically used to: put all the accounts in the peripheral system in the screening condition A, read the text of record A during screening, screen out the required accounts in the peripheral system, and filter out the accounts that do not exist in the peripheral system; the screening conditions include screening conditions corresponding to different screening times, and the screening times include zero, one, and two; when the screening times are two, the screening conditions include a primary screening condition and a secondary screening condition, and the screening module is used to: decompress the primary selection file to obtain the original text; screen the first text from the original text according to the primary screening condition, execute the storage command, and load the first text into the target database table; the screening module is also used to: screen the second text from the first text according to the secondary screening condition; load the second text into the full table; update the target database table according to the preset rules and the full table; The screening module is specifically used for: loading the first text recording transaction information into tables A, B, and C in the peripheral system, and after the second text is loaded into the full table, updating the expenditure amount and transaction number fields in tables A, B, and C according to the information recorded in the full table; if the account is closed, according to the records of the full table, deleting the information about the closed account in tables A and B recording the closed account; after the secondary screening conditions are screened, recording the obtained second text into the result text recording the name in the file loading configuration table, reading the text from the result text and loading it into the full table; the result text is used to store the required text after the screening is completed.
5. The device according to claim 4, characterized in that The device also includes an error reporting processing module, which is used to: When an error occurs while loading text, the text currently being loaded and the target database table corresponding to the text are recorded, and the text currently being loaded is determined as abnormal data; Receive revisions to anomalous data; Store the revised abnormal data and the corresponding target database table in a specified folder; The revised abnormal data in the specified folder is read by the timing program, and the revised abnormal data is loaded into the corresponding target database table.
6. The device according to claim 5, characterized in that The device also includes: The consistency check module is used to check the consistency between the data loaded into the target database table and the required text obtained by filtering according to the filtering conditions.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Method and system for copying data based on different databases
CN106815317A
Data processing method, apparatus, medium and electronic device
CN109460439A
File scheduling method and device in banking system
CN111340382A
Text processing device and method of bank peripheral system
CN113220869A
