Data file persistence processing method and device
By obtaining configuration information and control files and generating formal database tables, it solves the problems of data compatibility and low interaction efficiency in the existing technology, realizes efficient data file persistence processing, and simplifies data interaction between upstream and downstream systems.
Patent Information
- Application Number
- CN202410695535.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-08-23
AI Technical Summary
When the existing technology is compatible with different business scenarios and data source systems, it requires multiple configurations of data in different dimensions, resulting in high user training requirements, low efficiency, and inconvenient data interaction between upstream and downstream systems.
By obtaining configuration information based on batch task numbers and database configuration information tables, obtaining available control files and binary files, and generating formal tables of the database, it simplifies the data import process and reduces labor operation requirements.
It improves human work efficiency, facilitates data interaction between upstream and downstream systems, reduces coupling requirements for table structures, simplifies parameter configuration, and reduces learning costs.
Smart Images

Figure CN118535575A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent operation and maintenance technology, and in particular to a data file persistence processing method and device. Background Art
[0002] With the development of enterprise informatization and digitalization, a large amount of multi-source data needs to be persistently stored in the same database. The existing method can configure the data of different dimensions separately when it is necessary to be compatible with data from different business scenarios and different source data systems, and then uniformly process the different configuration information to achieve persistence of data from various systems in the same database.
[0003] However, the configuration of data of different dimensions is completed through different external files and configuration information in the database, which requires high initial training for users and a lot of manpower, resulting in low efficiency and inconvenience in data exchange between upstream and downstream systems. Summary of the invention
[0004] In view of the problems in the prior art, an embodiment of the present invention provides a data file persistence processing method and device, which can at least partially solve the problems in the prior art.
[0005] On the one hand, the present invention provides a data file persistence processing method, comprising:
[0006] Acquire configuration information according to the batch task number and the pre-acquired database configuration information table;
[0007] Obtaining an available control file according to the configuration information, and reading data according to the batch date and the configuration information to obtain a binary file;
[0008] A formal table of a database is generated according to the control file and the binary file.
[0009] Wherein, obtaining an available control file according to the configuration information includes:
[0010] If it is determined that a control file needs to be generated, then obtaining file field configuration table data according to the configuration information;
[0011] Generate a control file corresponding to the file field configuration table data, store the generated control file in a preset directory, and obtain an available control file from the preset directory.
[0012] The data file persistence processing method further includes:
[0013] If you are sure that you do not need to generate a control file, search in the preset directory to obtain an available control file.
[0014] The step of generating a formal table of a database according to the control file and the binary file includes:
[0015] Execute a bulk data import command on the control file and the binary file to import data into a pre-created temporary table;
[0016] Perform data operations on the temporary table for importing data to obtain the formal table of the database.
[0017] Wherein, obtaining the database configuration information table in advance includes:
[0018] Generate data query statements based on internal interface documents;
[0019] The database configuration information table is generated according to the data query statement.
[0020] The step of generating a data query statement according to the internal interface document includes:
[0021] The field information in the internal interface document is verified, and if it is determined that the verification passes, a data query statement is generated.
[0022] The step of pre-creating the temporary table includes:
[0023] Generate a statement for creating the temporary table according to the data query statement;
[0024] Execute a statement for creating the temporary table to create the temporary table.
[0025] On the one hand, the present invention provides a data file persistence processing device, comprising:
[0026] A first acquisition unit, used to acquire configuration information according to the batch task number and a pre-acquired database configuration information table;
[0027] A second acquisition unit is used to acquire an available control file according to the configuration information, and read data according to a batch date and the configuration information to obtain a binary file;
[0028] A generating unit is used to generate a formal table of a database according to the control file and the binary file.
[0029] In another aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus, wherein:
[0030] The processor and the memory communicate with each other via the bus;
[0031] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the following method:
[0032] Acquire configuration information according to the batch task number and the pre-acquired database configuration information table;
[0033] Obtaining an available control file according to the configuration information, and reading data according to the batch date and the configuration information to obtain a binary file;
[0034] A formal table of a database is generated according to the control file and the binary file.
[0035] An embodiment of the present invention provides a non-transitory computer-readable storage medium, including:
[0036] The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the following method:
[0037] Acquire configuration information according to the batch task number and the pre-acquired database configuration information table;
[0038] Obtaining an available control file according to the configuration information, and reading data according to the batch date and the configuration information to obtain a binary file;
[0039] A formal table of a database is generated according to the control file and the binary file.
[0040] The data file persistence processing method and device provided by the embodiment of the present invention obtain configuration information according to the batch task number and the pre-acquired database configuration information table; obtain the available control file according to the configuration information, and read the data according to the batch date and the configuration information to obtain the binary file; generate the formal table of the database according to the control file and the binary file, which can improve the work efficiency of manpower and facilitate the data interaction between upstream and downstream systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] 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:
[0042] Figure 1 It is a flowchart of a data file persistence processing method provided by an embodiment of the present invention.
[0043] Figure 2 It is a flowchart of a data file persistence processing method provided by another embodiment of the present invention.
[0044] Figure 3 It is a flowchart of a data file persistence processing method provided by another embodiment of the present invention.
[0045] Figure 4 It is a flowchart of a data file persistence processing method provided by another embodiment of the present invention.
[0046] Figure 5 It is a programming class diagram of the general file interface component provided by an embodiment of the present invention.
[0047] Figure 6 It is a structural diagram of a data file persistence processing device provided by an embodiment of the present invention.
[0048] Figure 7 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical scheme 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 illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention. It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other arbitrarily.
[0050] The tools and components independently developed by the present invention are described as follows:
[0051] Localization tool: used to convert user configuration files into configuration data records that can be recognized by the program
[0052] General file interface component: used to read upstream system data files and persist data information to the specified database based on the configuration information of each dimension.
[0053] Figure 1 FIG. 1 is a flow chart of a data file persistence processing method provided by an embodiment of the present invention. Figure 1 As shown, the data file persistence processing method provided by the embodiment of the present invention includes:
[0054] Step S1: Acquire configuration information according to the batch task number and the pre-acquired database configuration information table.
[0055] Step S2: Obtain available control files according to the configuration information, and read data according to the batch date and the configuration information to obtain a binary file.
[0056] Step S3: Generate a formal table of the database according to the control file and the binary file.
[0057] In the above step S1, the device obtains configuration information according to the batch task number and the pre-acquired database configuration information table. The device may be a computer device that executes the method, for example, it may include a server. It should be noted that the information collected in the embodiments of the present invention is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0058] Provide users with corresponding operation entrances for them to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.
[0059] In the above step S2, the device obtains an available control file according to the configuration information, and reads data according to the batch date and the configuration information to obtain a binary file.
[0060] In the above step S3, the device generates a formal table of the database according to the control file and the binary file.
[0061] like Figure 2 As shown, the data file persistence processing method based on the localization gadget and the universal file interface component is described as follows:
[0062] Entegor and XXL JOB are scheduling tools independently developed by a certain bank. They are not within the scope of this invention. They are only used to provide interface input parameters, batch date and batch task number in order to reflect the integrity of the system operation. The general file interface component obtains interface input parameters, batch date and batch task number through XXL JOB or Entegor. The general file interface component obtains configuration information according to the batch task number and Oracle configuration information table.
[0063] like Figure 3 As shown, the universal file interface component obtains the available control file (ie, ctl file) according to the configuration information, and the universal file interface component reads data according to the batch date and the configuration information to obtain a binary file (ie, bin file).
[0064] The obtaining of an available control file according to the configuration information includes:
[0065] If it is determined that a control file needs to be generated, then obtaining file field configuration table data according to the configuration information;
[0066] Generate a control file corresponding to the file field configuration table data, store the generated control file in a preset directory (ie, a server-specified directory), and obtain an available control file from the preset directory.
[0067] The data file persistence processing method also includes:
[0068] If you are sure that you do not need to generate a control file, search in the preset directory to obtain an available control file.
[0069] Generating a formal table of a database according to the control file and the binary file includes:
[0070] Execute a bulk data import command (i.e., sqllrd command) on the control file and the binary file to import data into a pre-created temporary table;
[0071] Perform data operations on the temporary table of imported data to obtain the formal table of the database. Figure 3 As shown, data operations can include adding, deleting and modifying operations.
[0072] like Figure 2 As shown, the database configuration information table is obtained in advance, including:
[0073] The localization gadget generates data query statements, i.e., SQL statements for data updates, based on the internal interface documents;
[0074] The database configuration information table is generated according to the data query statement.
[0075] like Figure 4 As shown, the step of generating a data query statement according to the internal interface document includes:
[0076] The field information in the internal interface document is verified, and if it is determined that the verification passes, a data query statement is generated. The localization gadget verifies the field information in the internal interface document, and if it is determined that the verification passes, a data query statement is generated, and the verification includes a non-empty check on the required fields and a format check on the specific fields. The generated data query statement is used to process the data information in the internal interface document.
[0077] Pre-create the temporary table, including:
[0078] Generate a statement for creating the temporary table according to the data query statement;
[0079] Execute the statement for creating the temporary table to create the temporary table. Figure 4 As shown, the localization gadget generates a statement for creating the temporary table according to the data query statement, and the universal file interface component executes the statement for creating the temporary table to create the temporary table.
[0080] The contents of the internal interface document are described as follows:
[0081] Interface definition:
[0082] 1. File interface ID: the unique number of the file.
[0083] 2. File name: The name of the data .bin file corresponding to the configuration information of this file, used to read the data file.
[0084] 3. Formal table name: The name of the table where the data is finally persisted.
[0085] 4. Temporary table name: Data import table in data.bin file, mainly for fault tolerance of data in data file.
[0086] 5. Batch task number: This task number represents the session number that is called up after being embedded in the internal scheduling platform.
[0087] 6. File receiving directory: the path where the upstream sends the data .bin file.
[0088] 7. File loading directory: This step configures a relative path. File processing will have a unified processing path. This path is only used to create corresponding subdirectories based on the business.
[0089] 8. Whether to generate a ctl file: Since the subsequent data persistence device uses the sqllrd command to store the data .bin file through the ctl file, the ctl file used in the process supports characteristic generation for each execution, and also supports using only the default unchanged ctl file.
[0090] 9. Formal table cleanup statement: provides two cleanup operations, 1-truncate to clean up data directly, 2-delete (according to the table date = batch date) to delete existing data; suitable for tables with full data supply.
[0091] 10. Optional operations for formal table update: Provide data update operations, 1. Merge_into by primary key, 2: Delete formal table records by primary key; Applicable to tables with incremental data supply.
[0092] Field definition:
[0093] 1. Fill in the field configuration according to the data field order provided by the data.bin file.
[0094] 2. Describe the field-related properties (type, length, Chinese name, description, whether it is nullable, whether it is the primary key). This type of configuration information is used to create a temporary table according to the interface document configuration, as well as the conditions for table data to be stored in the database.
[0095] The localization tool reads the configuration content in the above Excel document and generates a SQL file with the corresponding configuration information.
[0096] It can be provided to users in the form of a jar package. Locally, you can use the console to execute java-jar gpc_tools-gpc_tools.jar in the root directory where the jar is located to start the project.
[0097] Call the interface http: / / localhost:8080 / converter through POSTMAN to perform the conversion. The interface can receive inputPath (internal interface template.XLSX location) and outputPath (external interface template.XLSX and output interface document.XLSX location).
[0098] The interface input parameter can be empty. The localization tool provides the default input and output path D:\\gpcExcel.
[0099] Only generate the sql file of configuration information, instead of directly connecting to the database to complete the storage of configuration data, mainly for the purpose of authority separation and facilitating the detailed management of permissions.
[0100] The tables, fields, and scheduling configurations that can be configured in the file will be persisted in the following tables of the production control system:
[0101] (1) Batch interface file configuration table
[0102] 1) This configuration table reuses the existing configuration table and adds table fields according to this requirement. In order to be compatible with the existing data in the table, all newly added fields can be nullable fields.
[0103] 2) During the content persistence process, only the fields involved in this function will be assigned values, and the default values of the fields in the old table that are not involved in this function and cannot be empty will be used.
[0104] (2) Field configuration table
[0105] According to this requirement, a new configuration table is added to configure the table fields.
[0106] The table controls the order of content fields in the table through the order of primary key IDs. This order is consistent with the order of field definitions in the internal interface template .XLSX.
[0107] The active_flag field in the table is used as a valid identifier for data records. During the update process of the field configuration table, the previous records will be logically deleted (the active_flag field will be updated to 0), and then new data information will be inserted. For all queries on the table, only records with active_flag = 1 will be returned.
[0108] (3) File import batch configuration table
[0109] This table only needs to add batch scheduling tasks according to the batch number when a new product line is added.
[0110] For example, if the batch number defined for product 1 is 0001, then add configuration data to the file import batch configuration table. If a new product line order is required, update the batch_id field of the table according to the batch number defined for the product line.
[0111] The general file interface component is described as follows:
[0112] It realizes the reading of external data provided by users, automatically generates the corresponding ctl file, and persists the data to the source data table required for risk control through the sqllrd command.
[0113] Scheduling method: Package the program into an executable jar package and call it up through java-jar. When calling up, provide business parameters: batch_scene (batch scene), batch_no (batch number) and batch_date (specified date).
[0114] During the processing, the data will be subjected to quality inspection, general business logic verification and other pre-made verification. Programming class diagram, such as Figure 5 shown.
[0115] The design pattern application is shown in Table 1:
[0116] Table 1
[0117]
[0118] The data file persistence processing method provided by the embodiment of the present invention can complete the connection of various upstream systems through configuration during the data connection between production control and other systems. It solves the problem that the current system must create a large number of table structures that are exactly the same as the source system in the database when connecting to the upstream system, and complete the table data synchronization through database operations; the original method needs to add a large number of table structures as the upstream system increases, and synchronize at the database level. Due to efficiency issues, real-time synchronization cannot be performed, which reduces timeliness.
[0119] The data file persistence processing method provided by the embodiment of the present invention has the following beneficial effects:
[0120] 1. To connect to a new system, you only need to configure it according to the characteristics of the new system without changing the data file persistence device;
[0121] 2. Data is exchanged with the upstream system through data files, without any requirements on the upstream system data storage method, table structure, etc., thus reducing coupling with other systems;
[0122] 3. Parameter configuration such as data processing and data persistence can be completed through Excel files, which is easy for users to read and has a low learning cost;
[0123] 4. The generation and execution of parameter configuration scripts are divided into two steps to enable detailed permission management for various operations;
[0124] 5. The executable jar package has good performance, the impact range can be empty, and the trigger frequency can be customized according to the data timeliness requirements.
[0125] The data file persistence processing method provided by the embodiment of the present invention obtains configuration information according to the batch task number and the pre-acquired database configuration information table; obtains the available control file according to the configuration information, and reads the data according to the batch date and the configuration information to obtain the binary file; generates the formal table of the database according to the control file and the binary file, which can improve the work efficiency of manpower and facilitate the data interaction between upstream and downstream systems.
[0126] Further, obtaining an available control file according to the configuration information includes:
[0127] If it is determined that a control file needs to be generated, the file field configuration table data is obtained according to the configuration information; the above description may be referred to and will not be repeated here.
[0128] Generate a control file corresponding to the file field configuration table data, store the generated control file in a preset directory, and obtain an available control file from the preset directory. Please refer to the above embodiment for description, and no further details will be given.
[0129] The data file persistence processing method provided by the embodiment of the present invention can efficiently obtain available control files.
[0130] Furthermore, the data file persistence processing method also includes:
[0131] If it is determined that the control file does not need to be generated, then a search is performed in the preset directory to obtain an available control file. The above description can be referred to in the above embodiment, which will not be repeated here.
[0132] The data file persistence processing method provided by the embodiment of the present invention can efficiently obtain available control files.
[0133] Furthermore, generating a formal table of a database according to the control file and the binary file includes:
[0134] A bulk data import command is executed on the control file and the binary file to import data into a pre-created temporary table; this may be described with reference to the above embodiment and will not be described in detail.
[0135] The temporary table for importing data is operated to obtain the formal table of the database. The above-mentioned embodiments can be referred to for explanation and will not be described in detail.
[0136] The data file persistence processing method provided by the embodiment of the present invention can make the data in the formal table more accurate and the maintenance more efficient by performing data operations on the temporary table of imported data.
[0137] Furthermore, the database configuration information table is obtained in advance, including:
[0138] Generate a data query statement according to the internal interface document; refer to the above-mentioned embodiment for description and will not be repeated here.
[0139] The database configuration information table is generated according to the data query statement. The above-mentioned embodiment can be referred to for explanation and will not be described in detail.
[0140] The data file persistence processing method provided by the embodiment of the present invention can efficiently obtain the database configuration information table.
[0141] Further, generating a data query statement according to the internal interface document includes:
[0142] The field information in the internal interface document is verified, and if it is determined that the verification passes, a data query statement is generated. The above-mentioned embodiment can be referred to for explanation, and no further description is given.
[0143] The data file persistence processing method provided by the embodiment of the present invention can generate data query statements more accurately by verifying information.
[0144] Furthermore, pre-creating the temporary table includes:
[0145] A statement for creating the temporary table is generated according to the data query statement; the description may refer to the above embodiment and will not be repeated here.
[0146] The statement for creating the temporary table is executed to create the temporary table. The above description can be referred to in the above embodiment and will not be repeated here.
[0147] The data file persistence processing method provided by the embodiment of the present invention can efficiently create a temporary table.
[0148] It should be noted that the data file persistence processing method provided in the embodiment of the present invention can be used in the financial field, and can also be used in any technical field other than the financial field. The embodiment of the present invention does not limit the application field of the data file persistence processing method.
[0149] Figure 6 is a schematic diagram of the structure of a data file persistence processing device provided by an embodiment of the present invention. Figure 6 As shown, the data file persistence processing device provided by the embodiment of the present invention includes a first acquisition unit 601, a second acquisition unit 602 and a generation unit 603, wherein:
[0150] The first acquisition unit 601 is used to obtain configuration information according to the batch task number and the pre-acquired database configuration information table; the second acquisition unit 602 is used to obtain the available control file according to the configuration information, and read the data according to the batch date and the configuration information to obtain a binary file; the generation unit 603 is used to generate a formal table of the database according to the control file and the binary file.
[0151] Specifically, the first acquisition unit 601 in the device is used to obtain configuration information according to the batch task number and the pre-acquired database configuration information table; the second acquisition unit 602 is used to obtain the available control file according to the configuration information, and read the data according to the batch date and the configuration information to obtain a binary file; the generation unit 603 is used to generate a formal table of the database according to the control file and the binary file.
[0152] The data file persistence processing device provided by the embodiment of the present invention obtains configuration information according to the batch task number and the pre-acquired database configuration information table; obtains the available control file according to the configuration information, and reads the data according to the batch date and the configuration information to obtain the binary file; generates the formal table of the database according to the control file and the binary file, which can improve the work efficiency of manpower and facilitate the data interaction between upstream and downstream systems.
[0153] Furthermore, the second acquiring unit 602 is specifically configured to:
[0154] If it is determined that a control file needs to be generated, then obtaining file field configuration table data according to the configuration information;
[0155] Generate a control file corresponding to the file field configuration table data, store the generated control file in a preset directory, and obtain an available control file from the preset directory.
[0156] The data file persistence processing device provided by the embodiment of the present invention can efficiently obtain available control files.
[0157] Furthermore, the data file persistence processing device is also used for:
[0158] If you are sure that you do not need to generate a control file, search in the preset directory to obtain an available control file.
[0159] The data file persistence processing device provided by the embodiment of the present invention can efficiently obtain available control files.
[0160] Furthermore, the generating unit 603 is specifically used for:
[0161] Execute a bulk data import command on the control file and the binary file to import data into a pre-created temporary table;
[0162] Perform data operations on the temporary table for importing data to obtain the formal table of the database.
[0163] The data file persistence processing device provided by the embodiment of the present invention can make the data in the formal table more accurate and the maintenance more efficient by performing data operations on the temporary table of imported data.
[0164] Furthermore, the data file persistence processing device is also used for:
[0165] Generate data query statements based on internal interface documents;
[0166] The database configuration information table is generated according to the data query statement.
[0167] The data file persistence processing device provided by the embodiment of the present invention can efficiently obtain the database configuration information table.
[0168] Furthermore, the data file persistence processing device is also used for:
[0169] The field information in the internal interface document is verified, and if it is determined that the verification passes, a data query statement is generated.
[0170] The data file persistence processing device provided by the embodiment of the present invention can generate data query statements more accurately by verifying information.
[0171] Furthermore, the data file persistence processing device is also used for:
[0172] Generate a statement for creating the temporary table according to the data query statement;
[0173] Execute a statement for creating the temporary table to create the temporary table.
[0174] The data file persistence processing device provided by the embodiment of the present invention can efficiently create a temporary table.
[0175] The embodiment of the data file persistence processing device provided by the embodiment of the present invention can be specifically used to execute the processing flow of the above-mentioned method embodiments. Its functions are not repeated here, and reference can be made to the detailed description of the above-mentioned method embodiments.
[0176] Figure 7 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention, such as Figure 7 As shown, the electronic device includes: a processor (processor) 701, a memory (memory) 702 and a bus 703;
[0177] The processor 701 and the memory 702 communicate with each other via a bus 703;
[0178] The processor 701 is used to call the program instructions in the memory 702 to execute the methods provided by the above method embodiments, for example, including:
[0179] Acquire configuration information according to the batch task number and the pre-acquired database configuration information table;
[0180] Obtaining an available control file according to the configuration information, and reading data according to the batch date and the configuration information to obtain a binary file;
[0181] A formal table of a database is generated according to the control file and the binary file.
[0182] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can perform the methods provided by the above method embodiments, for example, including:
[0183] Acquire configuration information according to the batch task number and the pre-acquired database configuration information table;
[0184] Obtaining an available control file according to the configuration information, and reading data according to the batch date and the configuration information to obtain a binary file;
[0185] A formal table of a database is generated according to the control file and the binary file.
[0186] This embodiment provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program enables the computer to execute the methods provided by the above method embodiments, for example, including:
[0187] Acquire configuration information according to the batch task number and the pre-acquired database configuration information table;
[0188] Obtaining an available control file according to the configuration information, and reading data according to the batch date and the configuration information to obtain a binary file;
[0189] A formal table of a database is generated according to the control file and the binary file.
[0190] 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.
[0191] 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.
[0192] 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.
[0193] 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. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0194] In the description of this specification, the description with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0195] 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 data file persistence processing method, characterized in that: include: Acquire configuration information according to the batch task number and the pre-acquired database configuration information table; Obtaining an available control file according to the configuration information, and reading data according to the batch date and the configuration information to obtain a binary file; A formal table of a database is generated according to the control file and the binary file.
2. The data file persistence processing method according to claim 1, characterized in that: The obtaining of an available control file according to the configuration information includes: If it is determined that a control file needs to be generated, then obtaining file field configuration table data according to the configuration information; Generate a control file corresponding to the file field configuration table data, store the generated control file in a preset directory, and obtain an available control file from the preset directory.
3. The data file persistence processing method according to claim 1, characterized in that: The data file persistence processing method also includes: If you are sure that you do not need to generate a control file, search in the preset directory to obtain an available control file.
4. The data file persistence processing method according to claim 1, characterized in that: Generating a formal table of a database according to the control file and the binary file includes: Execute a bulk data import command on the control file and the binary file to import data into a pre-created temporary table; Perform data operations on the temporary table for importing data to obtain the formal table of the database.
5. The data file persistence processing method according to claim 4 is characterized in that: The database configuration information table is obtained in advance, including: Generate data query statements based on internal interface documents; The database configuration information table is generated according to the data query statement.
6. The data file persistence processing method according to claim 5, characterized in that: The step of generating a data query statement according to the internal interface document includes: The field information in the internal interface document is verified, and if it is determined that the verification passes, a data query statement is generated.
7. The data file persistence processing method according to claim 6, characterized in that: Pre-create the temporary table, including: Generate a statement for creating the temporary table according to the data query statement; Execute a statement for creating the temporary table to create the temporary table.
8. A data file persistence processing device, characterized in that: include: A first acquisition unit, used to acquire configuration information according to the batch task number and a pre-acquired database configuration information table; A second acquisition unit is used to acquire an available control file according to the configuration information, and read data according to a batch date and the configuration information to obtain a binary file; A generating unit is used to generate a formal table of a database according to the control file and the binary file.
9. An electronic 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 steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
