Bank database migration method and device
By generating and filtering the data intermediate files in the bank database, converting them into 'narrow' file sorting, and utilizing the partition feature for concurrent processing, the resource consumption problem caused by long and large data table records in the bank database migration is solved and the migration is improved. efficiency and accuracy.
Patent Information
- Application Number
- CN202110980892.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-25
- Publication Date
- 2024-10-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the migration process of the bank database, due to the long record length and large amount of data in the data table, a large amount of memory, IO and CPU resources were consumed in the banking business system, which increased the data processing pressure on the database and business system and reduced the migration efficiency.
By generating multiple data intermediate files and storing them in multiple disk partitions of the host, and determining the bank account number and bank card number corresponding to each customer number to be migrated, the associated data to be migrated is filtered out from each data intermediate file. Generate target files and load them into the target database, convert 'wide' file sorting to 'narrow' file sorting, and utilize the partition feature for concurrent processing.
It effectively reduces the consumption of memory, IO and CPU resources in the banking business system, reduces the data processing pressure on the database and business system, accurately defines the migration scope, and improves the efficiency of bank database migration.
Smart Images

Figure CN113590594B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a bank database migration method and device. 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] The area of customer information is one of the most basic areas of a bank. It is the foundation for providing customer service, meeting regulatory requirements, and internal bank management. In the comprehensive management of customer information, it is required to classify customers based on factors such as the completeness of customer information elements and customer activity, and to isolate and manage customers with lower levels of customer information quality, and only provide incomplete basic financial services. This requires taking the customer as the dimension, separating non-standard customers, as well as information such as accounts, cards, business relationships, etc. under the name of the customer from the original system, and taking over by the newly built system.
[0004] According to certain rules, part of the data in the source database table is screened, extracted, converted, and loaded into the target system. This process is called data migration.
[0005] For large-scale application systems, with the continuous expansion of business scope and long-term operation of the system, the accumulation of business data is very large and the association relationships are complex. In addition, in order to improve access and storage efficiency to a certain extent, some table structures adopt wide table design, which makes data migration work very challenging in terms of quantity, complexity and diversity.
[0006] Currently, when migrating a bank database, you can directly perform a SELECT operation on the bank data table. However, due to the huge amount of business data in the bank database, it will cause a large consumption of memory, IO and CPU resources of the bank business system, and will also reduce the efficiency of bank database migration. Summary of the invention
[0007] The embodiment of the present invention provides a bank database migration method, which relates to the field of big data technology and is used to improve the efficiency of bank database migration, reduce the consumption of memory, IO and CPU resources of a bank business system, and alleviate the data processing pressure of a bank database and a bank business system. The method comprises:
[0008] Generate multiple data intermediate files according to the data table to be migrated in the bank database; wherein the data table to be migrated is stored in multiple disk partitions of the host, and the multiple data intermediate files respectively correspond to different disk partitions of the host where the data table to be migrated is located;
[0009] Determine the bank account number to be migrated and the bank card number to be migrated corresponding to each customer number to be migrated;
[0010] Filtering out the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated, and the bank card number to be migrated from each data intermediate file, and generating a target file;
[0011] Load the target file into the target database.
[0012] The embodiment of the present invention further provides a bank database migration device, which relates to the field of big data technology and is used to improve the efficiency of bank database migration, reduce the consumption of memory, IO and CPU resources of a bank business system, and alleviate the data processing pressure of a bank database and a bank business system. The device includes:
[0013] The data intermediate file generation module is used to generate multiple data intermediate files according to the data table to be migrated in the bank database; wherein the data table to be migrated is stored in multiple disk partitions of the host, and the multiple data intermediate files respectively correspond to different disk partitions of the host where the data table to be migrated is located;
[0014] A module for determining bank account numbers to be migrated, used to determine the bank account numbers to be migrated and the bank card numbers to be migrated corresponding to each customer number to be migrated;
[0015] A target file generation module, used to filter out the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated and the bank card number to be migrated from each data intermediate file, and generate a target file;
[0016] The target file loading module is used to load the target file into the target database.
[0017] An embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the bank database migration method when executing the computer program.
[0018] 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 database migration method.
[0019] In an embodiment of the present invention, a plurality of data intermediate files are generated according to a data table to be migrated in a bank database; wherein the data table to be migrated is stored in a plurality of disk partitions of a host computer, and the plurality of data intermediate files respectively correspond to different disk partitions of the host computer where the data table to be migrated is located; the bank account number to be migrated and the bank card number to be migrated corresponding to each customer number to be migrated are determined; from each data intermediate file, the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated and the bank card number to be migrated are screened out to generate a target file; the target file is loaded into a target database, so that the migration of the data table in the bank database can be performed by generating a data intermediate file corresponding to each disk partition. The work is converted into the processing of data intermediate files, which solves the problem that under the existing technology, due to the long data table records and large data volume, direct migration of the data table will cause a large consumption of banking system memory, IO and CPU resources, and increase the data processing pressure of the bank database and the banking system. By generating data intermediate files, the consumption of banking system memory, IO and CPU resources can be effectively reduced, and the data processing pressure of the bank database and the banking system can be alleviated; at the same time, by screening out the data to be migrated corresponding to each customer number, the scope of bank database migration can be effectively defined, and the data to be migrated can be accurately obtained, thereby improving the efficiency of bank database migration. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] 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:
[0021] Figure 1 A schematic diagram of a bank database migration method according to an embodiment of the present invention;
[0022] Figure 2 A specific example diagram of a bank database migration method in an embodiment of the present invention;
[0023] Figure 3 This is a schematic diagram of the structure of a bank database migration device in an embodiment of the present invention;
[0024] Figure 4 This is a specific example diagram of a bank database migration device in an embodiment of the present invention;
[0025] Figure 5 This is a specific example diagram of a bank database migration device in an embodiment of the present invention;
[0026] Figure 6This is a specific example diagram of generating a data intermediate file in a bank database migration device in an embodiment of the present invention;
[0027] Figure 7 This is a specific example diagram of a data intermediate file in a bank database migration device according to an embodiment of the present invention;
[0028] Figure 8 This is a specific example diagram of a bank database migration device in an embodiment of the present invention;
[0029] Fig. 9 This is a specific example diagram of a bank database migration device in an embodiment of the present invention;
[0030] Fig.10 Schematic diagram of a computer device used for bank database migration in an embodiment of the present invention. DETAILED DESCRIPTION
[0031] 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.
[0032] The embodiments of the present invention involve the following terms, which are explained as follows:
[0033] Mainframe: Also known as a large mainframe, the English name is mainframe. Mainframes use a dedicated processor instruction set, operating system and application software. The term mainframe originally referred to a large computer system installed in a very large framed iron box to distinguish it from smaller minicomputers and microcomputers.
[0034] Data migration: refers to the data conversion process of converting various business data from the database table of the old system to the corresponding database table of the new system in scenarios such as replacement of the old system with the new system and migration of different business types from the old system to the new system in order to protect the business coverage and application functions of the original system. According to different system environments, data migration can be divided into homogeneous system data migration and heterogeneous system data migration.
[0035] Wide table: refers to a database table with more fields.
[0036] UNLOAD: Unloads data from one or more database targets into one or more QSAM sequential data sets.
[0037] At present, the customer information field is one of the basic fields of banks. It is the basis for customer service, meeting regulatory requirements, and internal management of banks. In the comprehensive management of customer information, it is required to classify customers according to factors such as the completeness of customer information elements and customer activity, and isolate customers with low customer information quality levels, and only provide incomplete basic financial services. This requires taking customers as the dimension, separating non-standard customers, as well as accounts, cards, business relationships and other information under the names of customers from the original system, and taking over by the new system. According to certain rules, some data in the source database table is screened, extracted, converted, and loaded into the target system. This process is called data migration.
[0038] For large-scale application systems, with the continuous expansion of business scope and long-term operation of the system, the accumulation of business data is very large and the association relationships are complex. In addition, in order to improve access and storage efficiency to a certain extent, some table structures adopt wide table design, which makes data migration work very challenging in terms of quantity, complexity and diversity.
[0039] Directly performing SELECT operations on the data table requires a lot of IO and CPU overhead. By recording files in order, the screening efficiency can be greatly improved. However, when the records are long and the data volume is large, directly sorting them will also consume a lot of IO, memory, and CPU resources, affecting the overall migration window.
[0040] In order to solve the above problems, the embodiment of the present invention provides a bank database migration method, which can be used to improve the efficiency of bank batch data migration, reduce the consumption of memory, IO and CPU resources of the banking business system during the migration process, and alleviate the data processing pressure of the bank database and the banking business system. Figure 1 As shown, the method may include:
[0041] Step 101: Generate multiple data intermediate files according to the data table to be migrated out in the bank database; wherein the data table to be migrated out is stored in multiple disk partitions of the host, and the multiple data intermediate files respectively correspond to different disk partitions of the host where the data table to be migrated out is located;
[0042] Step 102: Determine the bank account number to be migrated and the bank card number to be migrated corresponding to each customer number to be migrated;
[0043] Step 103: Filter out the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated and the bank card number to be migrated from each data intermediate file, and generate a target file;
[0044] Step 104: Load the target file into the target database.
[0045] In an embodiment of the present invention, a plurality of data intermediate files are generated according to a data table to be migrated in a bank database; wherein the data table to be migrated is stored in a plurality of disk partitions of a host, and the plurality of data intermediate files respectively correspond to different disk partitions of the host where the data table to be migrated is located; the bank account number to be migrated and the bank card number to be migrated corresponding to each customer number to be migrated are determined; from each data intermediate file, the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated and the bank card number to be migrated are screened out to generate a target file; the target file is loaded into a target database, so that by generating a data intermediate file corresponding to each disk partition, the migration work of the data table in the bank database can be converted into the migration work of the data intermediate file. The system processes the data in the data table and converts the sorting of the "wide" file into the sorting of the "narrow" file, which solves the problem that due to the long records and large amount of data in the data table under the existing technology, direct migration of the data table will cause a large consumption of the memory, IO and CPU resources of the banking business system, thereby increasing the data processing pressure of the bank database and the banking business system. By generating data intermediate files, the consumption of the memory, IO and CPU resources of the banking business system during the migration process can be effectively reduced, and the data processing pressure of the bank database and the banking business system can be alleviated; at the same time, by screening out the data to be migrated corresponding to each customer number, the scope of the bank database migration can be effectively defined, and the data to be migrated can be accurately obtained, thereby improving the migration efficiency of the bank database.
[0046] In the specific implementation, firstly, multiple data intermediate files are generated according to the data tables to be migrated in the bank database; wherein the data tables to be migrated are stored in multiple disk partitions of the host, and the multiple data intermediate files respectively correspond to different disk partitions of the host where the data tables to be migrated are located.
[0047] In an embodiment, the data intermediate file may be a QSAM (queued sequential access) data file.
[0048] In the above embodiment, by generating a data intermediate file corresponding to each disk partition, the "wide record" file can be converted into a "narrow record" file when there are many table fields, a large amount of data, and complex table associations. The migration of data tables in the bank database can be converted into the processing of data intermediate files, which solves the problem of the prior art that due to the long data table records and the large amount of data, direct migration of data tables will cause a large amount of consumption of memory, IO and CPU resources of the banking business system, thereby increasing the data processing pressure of the banking database and the banking business system. By generating data intermediate files, the consumption of memory, IO and CPU resources of the banking business system caused by data migration can be effectively reduced, thereby alleviating the data processing pressure of the banking database and the banking business system.
[0049] In one embodiment, generating multiple data intermediate files according to the data table to be migrated out in the bank database may include: using database UNLOAD technology to generate multiple data intermediate files according to the data table to be migrated out in the bank database.
[0050] In the above embodiment, by exporting the table data to be migrated as a QSAM data file, the operation on the physical table can be converted into the processing of file records, thereby reducing CPU and IO consumption.
[0051] For example, based on the data tables to be migrated in the bank database, multiple data intermediate files are generated. The UNLOAD technology can be used to store the table records that need to be migrated as data intermediate files, and the search operations on the database tables can be converted into file operations. At the same time, the characteristics of the partition table can be fully utilized to process concurrently by partition, and a data file can be generated for each partition.
[0052] This example uses a mainframe as an example. After the table data is UNLOADed, it is stored in the form of a QSAM file. The order of file records is consistent with the disk storage order.
[0053] In this example, the specific steps of generating multiple data intermediate files according to the data table to be migrated out in the bank database can be implemented by the code in Table 1.
[0054] Table 1
[0055]
[0056] The pseudo code of the code in Table 1 is as follows:
[0057]
[0058] In the specific implementation, after generating multiple data intermediate files based on the data table to be migrated in the bank database, determine the bank account number to be migrated and the bank card number to be migrated corresponding to each customer number to be migrated; and from each data intermediate file, filter out the data to be migrated associated with each customer number to be migrated, the above-mentioned bank account number to be migrated and the above-mentioned bank card number to be migrated, and generate a target file.
[0059] In the embodiment, the data to be migrated associated with the bank account number to be migrated and the bank card number to be migrated corresponding to the customer number to be migrated are screened out from each data intermediate file to generate a target file, which may include:
[0060] For each data intermediate file, each customer number in the data intermediate file is matched with the customer number to be migrated, and the data to be migrated corresponding to the customer number to be migrated in the data intermediate file is screened;
[0061] Generate a target file based on the data to be migrated corresponding to the customer number to be migrated in each data intermediate file;
[0062] and / or,
[0063] For each data intermediate file, the bank account number corresponding to each customer number in the data intermediate file is matched with the bank account number to be migrated, and the data to be migrated corresponding to the bank account number to be migrated in the data intermediate file is screened;
[0064] Generate a target file according to the to-be-migrated data corresponding to the to-be-migrated bank account in each data intermediate file;
[0065] and / or,
[0066] For each data intermediate file, the bank card number corresponding to each customer number in the data intermediate file is matched with the bank card number to be migrated, and the data to be migrated corresponding to the bank card number to be migrated in the data intermediate file is screened;
[0067] Generate a target file based on the data to be migrated corresponding to the bank card number to be migrated in each data intermediate file.
[0068] In one embodiment, the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated and the bank card number to be migrated are screened out from each data intermediate file to generate a target file, such as Figure 2 As shown, this may include:
[0069] Step 201: Filtering out the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated and the bank card number to be migrated from each data intermediate file at the same time;
[0070] Step 202: Generate a target file according to a preset file format for the data to be migrated that is screened out from each data intermediate file.
[0071] In the above embodiment, by filtering out the data to be migrated and the associated bank account number to be migrated and the bank card number to be migrated corresponding to the customer number to be migrated from each data intermediate file, and generating a target file, it is possible to simultaneously filter out the data to be migrated corresponding to each customer number from each data intermediate file, and achieve the purpose of concurrently processing the migration data of the bank database by partition, thereby improving the migration efficiency of the bank database and improving the concurrency of the bank database migration operation.
[0072] In the above embodiment, the migration table can be UNLOADed into 1 to N data intermediate files according to the partition (the specific number mainly considers the processing efficiency, storage space and concurrency upper limit), and the association between the migration tables is fully sorted out, the screening factor and sorting factor of each data table to be migrated are determined, and the "wide record" file is simplified into a "narrow record" file and then fully sorted. On the basis of the orderly files, the migration data of the customer-related table, the account-related table, and the card-related table are respectively screened out, and finally the target migration file is formed.
[0073] In the specific implementation, the bank account number to be migrated and the bank card number to be migrated corresponding to each customer number to be migrated are determined; from each data intermediate file, the data to be migrated associated with each customer number to be migrated, the above-mentioned bank account number to be migrated and the above-mentioned bank card number to be migrated are screened out, and after the target file is generated, the target file is loaded into the target database.
[0074] In the embodiment, the migration of the target data to be migrated is achieved by loading the target file into the target database. In the embodiment, by matching the bank account number corresponding to each customer number in the data intermediate file with the bank account number to be migrated for each data intermediate file, and filtering the data to be migrated corresponding to the bank account number to be migrated in the data intermediate file, and matching the bank card number corresponding to each customer number in the data intermediate file with the bank card number to be migrated for each data intermediate file, and filtering the data to be migrated corresponding to the bank card number to be migrated in the data intermediate file, the screening factor (i.e., the matching item when filtering the table records, such as the above-mentioned "customer number to be migrated" is a screening factor) can be indirectly determined.
[0075] In specific implementation, a bank database migration method provided by an embodiment of the present invention may further include: generating a list of data tables to be migrated out according to the business information of the bank database data migration;
[0076] Determine the disk partition information where each data table to be migrated in the list of data tables to be migrated is located;
[0077] According to the disk partition information where each data table to be migrated is located in the list of data tables to be migrated, the data tables to be migrated in the bank database are obtained.
[0078] In one embodiment, the business information may include business rules preset by the staff and design principles of the data migration system, which can be freely set according to the usage requirements of the staff.
[0079] In the embodiment, a list of data tables to be migrated can be sorted out and determined according to the bank system design and business functions, and it is helpful to collect the full amount of data of the migration table by UNLOAD technology in the previous step to generate a QSAM data file.
[0080] In the above embodiment, by generating a list of data tables to be migrated out and determining the disk partition information of each data table to be migrated out in the list of data tables to be migrated out, the data to be migrated out in the bank database can be finally obtained. Due to the high-concurrency large-scale batch data migration process in the current bank database, the number of migration operations executed and the intermediate files generated are very large. Through the above steps, the total number of migration file records of each migration table and the number of records finally migrated into the target database can be counted to ensure the accuracy and completeness of the migration.
[0081] In specific implementation, a bank database migration method provided by an embodiment of the present invention may further include:
[0082] Pre-configure the customer numbers to be migrated based on the customer's classification information.
[0083] In the embodiment, a list of corresponding bank accounts to be migrated, bank card numbers to be migrated, etc. can be generated according to the relationship between the customer number and the account number and card number, and the migration scope can be defined.
[0084] In the embodiment, by pre-configuring the customer numbers to be migrated according to the hierarchical classification information of the customers, the data to be migrated in the bank database in different batches can be accurately determined.
[0085] In specific implementation, for each data intermediate file, the bank account number corresponding to each customer number in the data intermediate file is matched with the bank account number to be migrated, and the data to be migrated corresponding to the bank account number to be migrated in the data intermediate file is screened, which may include:
[0086] For each data intermediate file:
[0087] Extract all bank account numbers from the data intermediate file;
[0088] For each bank account number, a number is added to obtain a first file; the number is a natural number sequence starting from 1 and can be used to identify the position of the record in the data intermediate file; the first file is sorted in a preset order of bank account numbers to obtain a second file; the preset order includes ascending or descending order;
[0089] Matching the bank account to be migrated (here, the bank account to be migrated is the sorted bank account to be migrated) with the bank account in the second file, and selecting the bank account in the second file that successfully matches and the number corresponding to the bank account;
[0090] Generate a third file based on the bank account number and the serial number corresponding to the bank account number in the second file that is successfully matched;
[0091] Arrange the bank account numbers in the third file in a preset order (such as ascending order) to obtain a fourth file;
[0092] The bank account number in the fourth file is matched with the corresponding data to be migrated with different numbers in the numbered data intermediate file to obtain the data to be migrated corresponding to the bank account to be migrated in the data intermediate file; the above-mentioned numbered data intermediate file is obtained by adding a number to the data intermediate file.
[0093] The record numbers of the above data intermediate files are obtained by counting during the sequential traversal of the files.
[0094] In one embodiment, for each data intermediate file, the bank card number corresponding to each customer number in the data intermediate file is matched with the bank card number to be migrated, and the data to be migrated corresponding to the bank card number to be migrated in the data intermediate file is screened, which may include:
[0095] For each data intermediate file:
[0096] Extract all bank card numbers from the data intermediate file;
[0097] For each bank card number, add a number to obtain a first file; the number is a natural number sequence starting from 1 and can be used to identify the position of the record in the data intermediate file; sort the first file in a preset order of bank card numbers to obtain a second file; the preset order includes ascending or descending order;
[0098] Matching the bank card numbers to be migrated (i.e. the sorted bank card numbers to be migrated) with the bank card numbers in the second file, and selecting the bank card numbers in the second file that are successfully matched and the numbers corresponding to the bank account numbers;
[0099] Generate a third file based on the bank card number in the second file that is successfully matched and the number corresponding to the bank account number;
[0100] Arrange the bank card numbers in the third file in a preset order (such as ascending order) to obtain a fourth file;
[0101] The bank card number in the fourth file is matched with the corresponding data to be migrated with different numbers in the data intermediate file to obtain the data to be migrated corresponding to the bank card number to be migrated in the data intermediate file; the above-mentioned numbered data intermediate file is obtained by adding a number to the data intermediate file.
[0102] The record numbers of the above data intermediate files are obtained by counting during the sequential traversal of the files.
[0103] In the embodiment, the "wide record" file to be screened is simplified into a "narrow record" file containing only the screening factor data items, and a "sequence number" column is added to the "narrow record" file to mark the position of the record in the file. At the same time, the above process can also use the DFSORT sorting tool to sort the "narrow record" file multiple times to ensure that each screening and matching operation is performed on the basis of orderly files, which greatly saves the system's IO, memory and CPU consumption and shortens the overall data migration time.
[0104] In the above embodiment, due to the high concurrency of large-scale batch data migration process in the current bank database, the number of migration jobs executed and the intermediate files generated are very large. Through the above steps, the total number of migration file records of each migration table and the final number of records migrated into the target database can be counted to ensure the accuracy and completeness of the migration.
[0105] In specific implementation, a bank database migration method provided by an embodiment of the present invention may further include:
[0106] Generate a list of data tables to be migrated based on the business information of this data migration in the bank database;
[0107] Determine the disk partition information where each data table to be migrated in the list of data tables to be migrated is located;
[0108] Load the target file into the target database, which can include:
[0109] According to the disk partition information where each data table to be migrated in the list of data tables to be migrated is located, the target file is loaded into the data table to be migrated in the target database.
[0110] In the embodiment, according to the disk partition information of each data table to be migrated in the data table list to be migrated, the target file is loaded into the data table to be migrated in the target database, so that the data to be migrated can be accurately transferred from the outgoing database to the incoming database.
[0111] In specific implementation, a bank database migration method provided by an embodiment of the present invention may further include:
[0112] For multiple data intermediate files, the data to be migrated and associated with the bank account number to be migrated and the bank card number to be migrated corresponding to the customer number to be migrated selected from each data intermediate file and the generated target file are recorded.
[0113] In the above embodiment, by adding a migration intermediate file packaging and storage function, it is ensured that the migration process is traceable and rollbackable.
[0114] In an embodiment of the present invention, a plurality of data intermediate files are generated according to a data table to be migrated in a bank database; wherein the data table to be migrated is stored in a plurality of disk partitions of a host, and the plurality of data intermediate files respectively correspond to different disk partitions of the host where the data table to be migrated is located; from each data intermediate file, the data to be migrated and associated with the bank account number to be migrated and the bank card number to be migrated corresponding to the customer number to be migrated are screened out to generate a target file; the target file is loaded into a target database, so that by generating a data intermediate file corresponding to each disk partition, the migration work of the data table in the bank database can be converted into the processing of the data intermediate file, which solves the problem that the direct migration of the data table will cause a large amount of consumption of the memory, IO and CPU resources of the bank business system due to the long data table records and the large amount of data under the prior art, and increase the data processing pressure of the bank database and the bank business system; by generating the data intermediate file, the consumption of the memory, IO and CPU resources of the bank business system can be effectively reduced, and the data processing pressure of the bank database and the bank business system can be alleviated; at the same time, by screening out the data to be migrated corresponding to each customer number, the scope of the bank database migration can be effectively defined, and the data to be migrated can be accurately obtained, thereby improving the migration efficiency of the bank database.
[0115] As described above, the embodiment of the present invention provides a universal and efficient batch banking database data migration method for mainframe-based application systems. In the case of a large number of table fields, a large amount of data, and complex table associations, a "wide record" file is converted into a "narrow record" file, and combined with DFSORT technology, data screening is performed on the basis that the file is basically ordered. At the same time, the table partitioning characteristics are used for segmented parallel processing to improve job concurrency and execution efficiency. Under the premise of ensuring the normal operation of the original system 7×24 hours, the migration data is quickly and accurately screened, converted, and loaded into the target system from the source database.
[0116] The embodiment of the present invention can UNLOAD a database table into a data file, convert table operations into file processing, and reduce system resource consumption; and can cleverly simplify a "wide record" file into a "narrow record" file, greatly improving sorting efficiency; at the same time, the table partitioning principle can be utilized to perform concurrent processing by partition, greatly improving processing efficiency.
[0117] The present invention also provides a bank database migration device, as described in the following embodiments. Since the principle of the device to solve the problem is similar to that of the bank database migration method, the implementation of the device can refer to the implementation of the bank database migration method, and the repeated parts will not be repeated.
[0118] The bank database migration device provided by the embodiment of the present invention can be used to improve the efficiency of bank database migration, reduce the consumption of memory, IO and CPU resources of the banking business system, and alleviate the data processing pressure of the bank database and the banking business system. Figure 3 As shown, the device may include:
[0119] The data intermediate file generation module 01 is used to generate multiple data intermediate files according to the data table to be migrated in the bank database; wherein the data table to be migrated is stored in multiple disk partitions of the host, and the multiple data intermediate files respectively correspond to different disk partitions of the host where the data table to be migrated is located;
[0120] The bank account number to be migrated determination module 02 is used to determine the bank account number to be migrated and the bank card number to be migrated corresponding to each customer number to be migrated;
[0121] The target file generation module 03 is used to filter out the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated and the bank card number to be migrated from each data intermediate file, and generate a target file;
[0122] The target file loading module 04 is used to load the target file into the target database.
[0123] In one embodiment, the present invention provides a bank database migration device, such as Figure 4 As shown, it may also include:
[0124] The module 05 for determining the data table to be migrated out is used for:
[0125] Generate a list of data tables to be migrated based on the business information of bank database data migration;
[0126] Determine the disk partition information where each data table to be migrated in the list of data tables to be migrated is located;
[0127] According to the disk partition information where each data table to be migrated is located in the list of data tables to be migrated, the data tables to be migrated in the bank database are obtained.
[0128] In one embodiment, a bank database migration device provided by an embodiment of the present invention may further include:
[0129] The customer number configuration module to be migrated is used for:
[0130] Pre-configure the customer numbers to be migrated based on the customer's classification information.
[0131] In one embodiment, the target file generation module is specifically used to:
[0132] For each data intermediate file, each customer number in the data intermediate file is matched with the customer number to be migrated, and the data to be migrated corresponding to the customer number to be migrated in the data intermediate file is screened;
[0133] Generate a target file based on the data to be migrated corresponding to the customer number to be migrated in each data intermediate file;
[0134] and / or,
[0135] For each data intermediate file, the bank account number corresponding to each customer number in the data intermediate file is matched with the bank account number to be migrated, and the data to be migrated corresponding to the bank account number to be migrated in the data intermediate file is screened;
[0136] Generate a target file according to the to-be-migrated data corresponding to the to-be-migrated bank account in each data intermediate file;
[0137] and / or,
[0138] For each data intermediate file, the bank card number corresponding to each customer number in the data intermediate file is matched with the bank card number to be migrated, and the data to be migrated corresponding to the bank card number to be migrated in the data intermediate file is screened;
[0139] Generate a target file based on the data to be migrated corresponding to the bank card number to be migrated in each data intermediate file.
[0140] In one embodiment, the target file generation module is specifically used to:
[0141] For each data intermediate file:
[0142] Extract all bank account numbers from the data intermediate file;
[0143] For each bank account number, a number is added to obtain a first file; the number is a natural number sequence starting from 1; the numbers in the first file are sorted in a preset order of bank account numbers to obtain a second file; the preset order includes ascending or descending order;
[0144] Matching the bank account to be migrated with the bank account in the second file, and selecting the bank account in the second file that matches successfully and the serial number corresponding to the bank account;
[0145] Generate a third file based on the bank account number and the serial number corresponding to the bank account number in the second file that is successfully matched;
[0146] The bank account numbers in the third file are arranged in a preset order to obtain a fourth file;
[0147] The bank account number in the fourth file is matched with the corresponding data to be migrated with different numbers in the numbered data intermediate file to obtain the data to be migrated corresponding to the bank account to be migrated in the data intermediate file; the above-mentioned numbered data intermediate file is obtained by adding a number to the data intermediate file.
[0148] In one embodiment, the target file generation module is specifically used to:
[0149] For each data intermediate file:
[0150] Extract all bank card numbers from the data intermediate file;
[0151] For each bank card number, add a number to obtain a first file; the number is a natural number sequence starting from 1; the numbers in the first file are sorted in a preset order of bank card numbers to obtain a second file; the preset order includes ascending or descending order;
[0152] Match the bank card number to be migrated with the bank card number in the second file, and select the bank card number in the second file that matches successfully and the number of the corresponding bank account number;
[0153] Generate a third file based on the bank card number in the second file that is successfully matched and the number corresponding to the bank account number;
[0154] Arrange the bank card numbers in the third file in a preset sequence to obtain a fourth file;
[0155] The bank card number in the fourth file is matched with the corresponding data to be migrated with different numbers in the numbered data intermediate file to obtain the data to be migrated corresponding to the bank card number to be migrated in the data intermediate file; the above numbered data intermediate file is obtained by adding a number to the data intermediate file.
[0156] In one embodiment, the target file generation module is specifically used to:
[0157] At the same time, from each data intermediate file, the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated and the bank card number to be migrated are screened out;
[0158] The data to be migrated selected from each intermediate data file is generated into a target file according to a preset file format.
[0159] In one embodiment, a bank database migration device provided by an embodiment of the present invention may further include:
[0160] The disk partition information determination module is used to:
[0161] Generate a list of data tables to be migrated based on the business information of this data migration in the bank database;
[0162] Determine the disk partition information where each data table to be migrated in the list of data tables to be migrated is located;
[0163] The target file loading module is used for:
[0164] According to the disk partition information where each data table to be migrated in the list of data tables to be migrated is located, the target file is loaded into the data table to be migrated in the target database.
[0165] A specific embodiment is given below to illustrate the specific application of the device of the present invention. In this embodiment, Figure 5 This can include:
[0166] (1) Data table UNLOAD module (i.e. the above-mentioned data intermediate file generation module and the module for determining the data tables to be migrated): based on the system design and business functions, the list of data tables to be migrated is sorted out and determined, and the full amount of data of the data tables to be migrated is collected using the UNLOAD technology to generate QSAM data files;
[0167] (2) Screening factor determination module (i.e., the above-mentioned customer number configuration module and target file generation module to be migrated): determines the list of non-standard customer numbers according to the migration rules, and generates the corresponding migration account number, card number, etc. list according to the relationship between the customer number and the account number and card number, i.e., defines the migration scope for subsequent screening of relevant table records;
[0168] (3) Data screening module (i.e., the target file generation module mentioned above): screening out data in the migration table that meets the migration conditions;
[0169] (4) Target format conversion module (i.e., the target file loading module mentioned above): integrates the migration data into the target format and generates the final migration file;
[0170] (5) Target system loading module (i.e., the target file loading module mentioned above): loads the migration file data into the target system database;
[0171] (6) Source system data deletion module: logically or physically delete the data that has been migrated out of the source system database;
[0172] (7) Migration result checking module (i.e. the target file generating module mentioned above): checks whether the migrated-out data and the migrated-in data are consistent.
[0173] The following is a detailed description of the device in this example in conjunction with the figure:
[0174] 1. Data table UNLOAD module, specifically used for:
[0175] Determine the list of data tables to be migrated based on the business information of bank database data migration;
[0176] Determine the disk partition information where each data table to be migrated in the list of data tables to be migrated is located;
[0177] According to the disk partition information where each data table to be migrated is located in the list of data tables to be migrated, the data tables to be migrated in the bank database are obtained;
[0178] Generate multiple data intermediate files based on the data tables to be migrated in the bank database.
[0179] In this module, if Figure 6 As shown, multiple data intermediate files can be generated according to the data tables to be migrated in the bank database, so as to determine the migration table range, and adopt UNLOAD technology to store the table records that need to be migrated as data files, and convert the search operation on the database table into an operation on the file; at the same time, make full use of the characteristics of the partition table, process concurrently by partition, and generate a data file for each partition.
[0180] like Figure 7 As shown in Table 2, after the table data is UNLOADed, it is stored in the form of QSAM files, and the order of file records is consistent with the disk storage order. Figure 7 Explain that one row of records in the file corresponds to a complete record in the table.
[0181] Table 2
[0182] Fields Type & Length meaning Institution Number CHAR(3) "003” Partition Number CHAR(3) The partition number of the table card number CHAR(19) card number Product Number CHAR(10) Card Product Number BIN Number CHAR(5) Card BIN number Customer Number CHAR(16) Customer Number …… …… ……
[0183] 2. Screening Factor Determination Module
[0184] (1) Classifying tables, such as customer tables, account tables, and card tables, that is, the above-mentioned customer number configuration module to be migrated can be used to pre-configure customer numbers to be migrated based on customer classification information;
[0185] (2) According to the personal and corporate customer information management regulations, the customer information quality is graded and classified, and a list of irregular customer numbers that need to be isolated is determined; it should be noted that in this example, the customer numbers to be migrated can be the list of irregular customer numbers that need to be isolated;
[0186] (3) Using the customer and account relationship table and the customer and card relationship table, filter and generate a list of irregular accounts and a list of card numbers, and sort them in ascending order as screening factors for subsequent tables.
[0187] During the entire process, the partitioning characteristics of the database table can be fully utilized. Each partition generates an UNLOAD file, and multiple partitions are processed in parallel, effectively reducing the processing time.
[0188] The workflow of the above screening factor determination module can be as follows: Figure 8 The above filtering factors correspond to the customer numbers to be migrated. In different batches of data migration tasks, different filtering factors can be set, such as the customer numbers to be migrated, the bank account numbers to be migrated, and the bank card numbers to be migrated, etc., which can be flexibly set according to the usage requirements of the staff.
[0189] 3. The data screening module, i.e. the target file generation module mentioned above, is specifically used for: for each data intermediate file: extracting all bank account numbers from the data intermediate file; adding a number to each bank account number to obtain a first file; the number is a natural number sequence starting from 1; sorting the numbers in the first file in a preset order of bank account numbers to obtain a second file; the preset order includes ascending or descending order; matching the bank account number to be migrated with the bank account number in the second file, and screening out the bank account number in the second file that successfully matches;
[0190] Generate a third file based on the bank account numbers in the second file that have been successfully matched; arrange the bank account numbers in the third file in a preset order of numbers to obtain a fourth file; match the numbers of the bank account numbers in the fourth file with the corresponding data to be migrated with different numbers in the numbered data intermediate file to obtain the data to be migrated corresponding to the bank account numbers to be migrated in the data intermediate file; the above-mentioned numbered data intermediate file is obtained by adding a number to the data intermediate file.
[0191] And, a target file generation module is specifically used to: for each data intermediate file: extract all bank card numbers from the data intermediate file; add a number to each bank card number to obtain a first file; the above number is a natural number sequence starting from 1; sort the first file in a preset order of bank card numbers to obtain a second file; the above preset order includes ascending or descending order; match the bank card numbers to be migrated with the bank card numbers in the second file, and filter out the bank card numbers in the second file that successfully match; generate a third file based on the bank card numbers in the second file that successfully match; arrange the bank card numbers in the third file in a preset order of numbers to obtain a fourth file; match the numbers of the bank card numbers in the fourth file in sequence with the corresponding data to be migrated with different numbers in the data intermediate file, and obtain the data to be migrated corresponding to the bank card numbers to be migrated in the data intermediate file; the record numbers of the above data intermediate files are obtained by counting during the sequential traversal of the files.
[0192] The above data screening module is the most important part of the entire migration process. Let's take the deposit table processing process as an example to illustrate. Fig. 9As shown in the figure, according to the list of irregular accounts, all records in the account extension table INVE that meet the screening conditions can be filtered out:
[0193] Follow the steps below to describe the workflow of the above data filtering module:
[0194] (1) Traverse the entire UNLOAD data file of the INVE table, extract the "account" column, and add a "sequence number" column. The sequence number starts at 1 and increases in sequence to mark the position of the record in the UNLOAD file. Output the file F1 with the structure of "sequence number" + "account number";
[0195] (2) Sort file F1 by "account number" in the same order as the irregular account number file, and generate file F2 in order by account number;
[0196] (3) Sequentially traverse the irregular account list and file F2, match by account number, filter out irregular account records in F2, and generate an intermediate screening file F3 with the structure of "sequence number" + "account number";
[0197] (4) Sort file F3 in ascending order by "sequence number" to generate file F4 sorted by "sequence number". At this time, the record order of file F4 is consistent with that of the full UNLOAD file;
[0198] (5) Sequentially traverse file F4 and the full UNLOAD file, match them by sequence number, filter out the complete records corresponding to the irregular accounts in the INVE table, and form the final screening result - INVE table migration file F5.
[0199] During the entire screening process, the database table partitioning feature can be fully utilized. Each partition generates an UNLOAD file, and multiple partitions execute the following processes in parallel, effectively reducing processing time.
[0200] 4. A target format conversion module is used to: filter out the data to be migrated associated with the bank account number to be migrated and the bank card number to be migrated corresponding to the customer number to be migrated from each data intermediate file, and generate a target file.
[0201] According to certain mapping logic, the data to be migrated is processed to generate the target file. It can be executed concurrently according to the table partition characteristics.
[0202] 5. Target system loading module
[0203] According to certain mapping logic, the target file is loaded into the target database. It can be executed concurrently according to the table partition characteristics.
[0204] 6. Source system data deletion module
[0205] After ensuring that the data is correctly loaded in the target system, logically or physically delete the data that has been migrated out of the source system as required based on the migration file generated in step 3. This can be performed concurrently based on the table partition characteristics.
[0206] VII. Migration result check module
[0207] Ensure the correctness of the migration results by counting and checking the total number of records migrated out of each table migration file and the number of records migrated into the target database.
[0208] Of course, it is understandable that the above detailed process may have other variations, and the relevant variations should all fall within the protection scope of the present invention.
[0209] An embodiment of the present invention provides an embodiment of a computer device for implementing all or part of the contents of the above-mentioned bank database migration method. The above-mentioned computer device specifically includes the following contents:
[0210] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between related devices; the computer device can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the computer device can be implemented with reference to the embodiment for implementing the bank database migration method and the embodiment for implementing the bank database migration device, the contents of which are incorporated herein and the repeated parts are not repeated.
[0211] Fig.10 FIG. 1 is a schematic block diagram of the system structure of the computer device 1000 according to an embodiment of the present application. Fig.10 As shown, the computer device 1000 may include a central processor 1001 and a memory 1002; the memory 1002 is coupled to the central processor 1001. It is worth noting that Fig.10 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0212] In one embodiment, the bank database migration function may be integrated into the central processor 1001. The central processor 1001 may be configured to perform the following control:
[0213] Generate multiple data intermediate files according to the data table to be migrated in the bank database; wherein the data table to be migrated is stored in multiple disk partitions of the host, and the multiple data intermediate files respectively correspond to different disk partitions of the host where the data table to be migrated is located;
[0214] Determine the bank account number to be migrated and the bank card number to be migrated corresponding to each customer number to be migrated;
[0215] Filtering out the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated, and the bank card number to be migrated from each data intermediate file, and generating a target file;
[0216] Load the target file into the target database.
[0217] In another embodiment, the bank database migration device may be configured separately from the central processor 1001. For example, the bank database migration device may be configured as a chip connected to the central processor 1001, and the bank database migration function is implemented under the control of the central processor.
[0218] like Fig.10 As shown, the computer device 1000 may also include: a communication module 1003, an input unit 1004, an audio processor 1005, a display 1006, and a power supply 1007. It is worth noting that the computer device 1000 does not necessarily have to include Fig.10 In addition, the computer device 1000 may also include Fig.10 For components not shown, reference may be made to the prior art.
[0219] like Fig.10 As shown, the central processor 1001 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The central processor 1001 receives inputs and controls the operations of various components of the computer device 1000 .
[0220] The memory 1002 may be, for example, a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices, or one or more thereof. The above-mentioned information related to the failure may be stored, and a program for executing the related information may also be stored. The central processing unit 1001 may execute the program stored in the memory 1002 to implement information storage or processing, etc.
[0221] The input unit 1004 provides input to the CPU 1001. The input unit 1004 is, for example, a key or a touch input device. The power supply 1007 is used to provide power to the computer device 1000. The display 1006 is used to display display objects such as images and text. The display may be, for example, an LCD display, but is not limited thereto.
[0222] The memory 1002 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 1002 may also be some other type of device. The memory 1002 includes a buffer memory 1021 (sometimes referred to as a buffer). The memory 1002 may include an application / function storage unit 1022, which is used to store application programs and function programs or processes for executing the operation of the computer device 1000 through the central processor 1001.
[0223] The memory 1002 may also include a data storage unit 1023 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the computer device. The driver storage unit 1024 of the memory 1002 may include various drivers for the computer device for communication functions and / or for executing other functions of the computer device (such as messaging applications, address book applications, etc.).
[0224] The communication module 1003 is a transmitter / receiver 1003 that sends and receives signals via the antenna 1008. The communication module (transmitter / receiver) 1003 is coupled to the central processor 1001 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0225] Based on different communication technologies, multiple communication modules 1003 may be provided in the same computer device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) 1003 is also coupled to a speaker 1009 and a microphone 1010 via an audio processor 1005 to provide an audio output via the speaker 1009 and receive an audio input from the microphone 1010, thereby realizing a common telecommunication function. The audio processor 1005 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 1005 is also coupled to the central processor 1001, so that recording can be performed on the local machine through the microphone 1010, and the sound stored on the local machine can be played through the speaker 1009.
[0226] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program for executing the above-mentioned bank database migration method.
[0227] In an embodiment of the present invention, a plurality of data intermediate files are generated according to a data table to be migrated in a bank database; wherein the data table to be migrated is stored in a plurality of disk partitions of a host computer, and the plurality of data intermediate files respectively correspond to different disk partitions of the host computer where the data table to be migrated is located; the bank account number to be migrated and the bank card number to be migrated corresponding to each customer number to be migrated are determined; from each data intermediate file, the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated and the bank card number to be migrated are screened out to generate a target file; the target file is loaded into a target database, so that the migration of the data table in the bank database can be performed by generating a data intermediate file corresponding to each disk partition. The work is converted into the processing of data intermediate files, which solves the problem that under the existing technology, due to the long data table records and large data volume, direct migration of the data table will cause a large consumption of banking system memory, IO and CPU resources, and increase the data processing pressure of the bank database and the banking system. By generating data intermediate files, the consumption of banking system memory, IO and CPU resources can be effectively reduced, and the data processing pressure of the bank database and the banking system can be alleviated; at the same time, by screening out the data to be migrated corresponding to each customer number, the scope of bank database migration can be effectively defined, and the data to be migrated can be accurately obtained, thereby improving the efficiency of bank database migration.
[0228] 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.
[0229] 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.
[0230] 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 including 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.
[0231] 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.
[0232] 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 bank database migration method, characterized in that: include: Generate multiple data intermediate files according to the data table to be migrated in the bank database; wherein the data table to be migrated is stored in multiple disk partitions of the host, and the multiple data intermediate files respectively correspond to different disk partitions of the host where the data table to be migrated is located; Determine the bank account number to be migrated and the bank card number to be migrated corresponding to each customer number to be migrated; Filtering out the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated, and the bank card number to be migrated from each data intermediate file, and generating a target file; Load the target file into the target database; From each data intermediate file, the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated, and the bank card number to be migrated are screened out to generate a target file, including: For each data intermediate file, each customer number in the data intermediate file is matched with the customer number to be migrated, and the data to be migrated corresponding to the customer number to be migrated in the data intermediate file is screened; and a target file is generated according to the data to be migrated corresponding to the customer number to be migrated in each data intermediate file; and / or, for each data intermediate file, matching the bank account number corresponding to each customer number in the data intermediate file with the bank account number to be migrated, and screening out the data to be migrated corresponding to the bank account number to be migrated in the data intermediate file; generating a target file according to the data to be migrated corresponding to the bank account number to be migrated in each data intermediate file; And / or, for each data intermediate file, the bank card number corresponding to each customer number in the data intermediate file is matched with the bank card number to be migrated, and the data to be migrated corresponding to the bank card number to be migrated in the data intermediate file is screened out; and a target file is generated based on the data to be migrated corresponding to the bank card number to be migrated in each data intermediate file.
2. The method according to claim 1, characterized in that Also includes: Generate a list of data tables to be migrated based on the business information of bank database data migration; Determine the disk partition information where each data table to be migrated in the list of data tables to be migrated is located; According to the disk partition information where each data table to be migrated is located in the list of data tables to be migrated, the data tables to be migrated in the bank database are obtained.
3. The method according to claim 1, characterized in that Also includes: Pre-configure the customer numbers to be migrated based on the customer's classification information.
4. The method according to claim 1, characterized in that For each data intermediate file, the bank account number corresponding to each customer number in the data intermediate file is matched with the bank account number to be migrated, and the data to be migrated corresponding to the bank account number to be migrated in the data intermediate file is screened, including: For each data intermediate file: Extract all bank account numbers from the data intermediate file; For each bank account number, a number is added to obtain a first file; the number is a natural number sequence starting from 1; the numbers in the first file are sorted in a preset order of bank account numbers to obtain a second file; the preset order includes ascending or descending order; Matching the bank account to be migrated with the bank account in the second file, and selecting the bank account in the second file that matches successfully and the serial number corresponding to the bank account; Generate a third file based on the bank account number and the serial number corresponding to the bank account number in the second file that is successfully matched; The bank account numbers in the third file are arranged in a preset order to obtain a fourth file; The bank account number in the fourth file is matched with the corresponding data to be migrated with different numbers in the numbered data intermediate file to obtain the data to be migrated corresponding to the bank account to be migrated in the data intermediate file; the numbered data intermediate file is obtained by adding a number to the data intermediate file.
5. The method according to claim 1, characterized in that For each data intermediate file, the bank card number corresponding to each customer number in the data intermediate file is matched with the bank card number to be migrated, and the data to be migrated corresponding to the bank card number to be migrated in the data intermediate file is screened, including: For each data intermediate file: Extract all bank card numbers from the data intermediate file; For each bank card number, add a number to obtain a first file; the number is a natural number sequence starting from 1; the numbers in the first file are sorted in a preset order of bank card numbers to obtain a second file; the preset order includes ascending or descending order; Match the bank card number to be migrated with the bank card number in the second file, and select the bank card number in the second file that matches successfully and the number of the corresponding bank account; Generate a third file based on the bank card number in the second file that is successfully matched and the number corresponding to the bank account number; Arrange the bank card numbers in the third file in a preset sequence to obtain a fourth file; The bank card number in the fourth file is matched with the corresponding data to be migrated with different numbers in the numbered data intermediate file to obtain the data to be migrated corresponding to the bank card number to be migrated in the data intermediate file; the numbered data intermediate file is obtained by adding a number to the data intermediate file.
6. The method according to claim 1, characterized in that From each data intermediate file, the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated, and the bank card number to be migrated are screened out to generate a target file, including: At the same time, from each data intermediate file, the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated and the bank card number to be migrated are screened out; The data to be migrated selected from each intermediate data file is generated into a target file according to a preset file format.
7. The method according to claim 1, characterized in that Also includes: Generate a list of data tables to be migrated based on the business information of this data migration in the bank database; Determine the disk partition information where each data table to be migrated in the list of data tables to be migrated is located; Load the target file into the target database, including: According to the disk partition information where each data table to be migrated in the list of data tables to be migrated is located, the target file is loaded into the data table to be migrated in the target database.
8. A bank database migration device, characterized in that: include: The data intermediate file generation module is used to generate multiple data intermediate files according to the data table to be migrated in the bank database; wherein the data table to be migrated is stored in multiple disk partitions of the host, and the multiple data intermediate files respectively correspond to different disk partitions of the host where the data table to be migrated is located; A module for determining bank account numbers to be migrated, used to determine the bank account numbers to be migrated and the bank card numbers to be migrated corresponding to each customer number to be migrated; A target file generation module, used to filter out the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated and the bank card number to be migrated from each data intermediate file, and generate a target file; A target file loading module, used for loading the target file into the target database; The target file generation module is specifically used to: for each data intermediate file, match each customer number in the data intermediate file with the customer number to be migrated, and filter out the data to be migrated corresponding to the customer number to be migrated in the data intermediate file; generate a target file according to the data to be migrated corresponding to the customer number to be migrated in each data intermediate file; and / or, for each data intermediate file, matching the bank account number corresponding to each customer number in the data intermediate file with the bank account number to be migrated, and screening out the data to be migrated corresponding to the bank account number to be migrated in the data intermediate file; generating a target file according to the data to be migrated corresponding to the bank account number to be migrated in each data intermediate file; And / or, for each data intermediate file, the bank card number corresponding to each customer number in the data intermediate file is matched with the bank card number to be migrated, and the data to be migrated corresponding to the bank card number to be migrated in the data intermediate file is screened out; and a target file is generated based on the data to be migrated corresponding to the bank card number to be migrated in each data intermediate file.
9. The device according to claim 8, characterized in that Also includes: The module for determining the data table to be migrated out is used for: Generate a list of data tables to be migrated based on the business information of bank database data migration; Determine the disk partition information where each data table to be migrated in the list of data tables to be migrated is located; According to the disk partition information where each data table to be migrated is located in the list of data tables to be migrated, the data tables to be migrated in the bank database are obtained.
10. The device according to claim 8, characterized in that Also includes: The customer number configuration module to be migrated is used for: Pre-configure the customer numbers to be migrated based on the customer's classification information.
11. The device according to claim 8, characterized in that Target file generation module, specifically used for: For each data intermediate file: Extract all bank account numbers from the data intermediate file; For each bank account number, a number is added to obtain a first file; the number is a natural number sequence starting from 1; the numbers in the first file are sorted in a preset order of bank account numbers to obtain a second file; the preset order includes ascending or descending order; Matching the bank account to be migrated with the bank account in the second file, and selecting the bank account in the second file that matches successfully and the serial number corresponding to the bank account; Generate a third file based on the bank account number and the serial number corresponding to the bank account number in the second file that is successfully matched; The bank account numbers in the third file are arranged in a preset order to obtain a fourth file; The bank account number in the fourth file is matched with the corresponding data to be migrated with different numbers in the numbered data intermediate file to obtain the data to be migrated corresponding to the bank account to be migrated in the data intermediate file; the numbered data intermediate file is obtained by adding a number to the data intermediate file.
12. The device according to claim 8, characterized in that Target file generation module, specifically used for: For each data intermediate file: Extract all bank card numbers from the data intermediate file; For each bank card number, add a number to obtain a first file; the number is a natural number sequence starting from 1; Sorting the numbers in the first file in a preset order of bank card numbers to obtain a second file; the preset order includes ascending or descending order; Match the bank card number to be migrated with the bank card number in the second file, and select the bank card number in the second file that matches successfully and the number of the corresponding bank account; Generate a third file based on the bank card number in the second file that is successfully matched and the number corresponding to the bank account number; Arrange the bank card numbers in the third file in a preset sequence to obtain a fourth file; The bank card number in the fourth file is matched with the corresponding data to be migrated with different numbers in the numbered data intermediate file to obtain the data to be migrated corresponding to the bank card number to be migrated in the data intermediate file; the numbered data intermediate file is obtained by adding a number to the data intermediate file.
13. The device according to claim 8, characterized in that Target file generation module, specifically used for: At the same time, from each data intermediate file, the data to be migrated associated with each customer number to be migrated, the bank account number to be migrated and the bank card number to be migrated are screened out; The data to be migrated selected from each intermediate data file is generated into a target file according to a preset file format.
14. The device according to claim 8, characterized in that Also includes: The disk partition information determination module is used to: Generate a list of data tables to be migrated based on the business information of this data migration in the bank database; Determine the disk partition information where each data table to be migrated in the list of data tables to be migrated is located; The target file loading module is used for: According to the disk partition information where each data table to be migrated in the list of data tables to be migrated is located, the target file is loaded into the data table to be migrated in the target database.
15. 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 7 is implemented.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the method according to any one of claims 1 to 7.
