CN114860668A - Online dynamic generation method and device for data file - Google Patents

Online dynamic generation method and device for data file Download PDF

Info

Publication number
CN114860668A
CN114860668A CN202210541418.8A CN202210541418A CN114860668A CN 114860668 A CN114860668 A CN 114860668A CN 202210541418 A CN202210541418 A CN 202210541418A CN 114860668 A CN114860668 A CN 114860668A
Authority
CN
China
Prior art keywords
data file
data
generated
format
attribute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210541418.8A
Other languages
Chinese (zh)
Inventor
李志强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202210541418.8A priority Critical patent/CN114860668A/en
Publication of CN114860668A publication Critical patent/CN114860668A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for dynamically generating a data file on line, which are applied to the technical field of big data, and the method comprises the following steps: analyzing the data file to be generated, and obtaining the data file format and the data file generation mode of the data file to be generated; acquiring data source information input by a user, wherein the data source information is input by the user based on the data file format and the data file generation mode; obtaining template information of a data file to be generated, wherein the template information is generated by a user through formatting configuration based on the data source information; after the business data are obtained, the template information selected by the user for the business data is received, the business data are associated with the template information selected by the user, and a data file is generated. The invention can dynamically generate the data file on line and has high efficiency.

Description

Online dynamic generation method and device for data file
Technical Field
The invention relates to the technical field of big data, in particular to a method and a device for dynamically generating a data file on line.
Background
With the gradual development of each line of business, business personnel put higher requirements on system configurability in order to advance business progress as soon as possible. For example: some data files in TXT and XML formats have differences after being adjusted every time due to frequent adjustment of services, and a method for dynamically generating data files on line is needed at present in order to respond to rapid progress of services of service personnel and reduce the times of code adjustment and production.
Disclosure of Invention
The embodiment of the invention provides an online dynamic generation method of a data file, which is used for dynamically generating the data file online and has high efficiency, and comprises the following steps:
analyzing the data file to be generated, and obtaining the data file format and the data file generation mode of the data file to be generated;
acquiring data source information input by a user, wherein the data source information is input by the user based on the data file format and the data file generation mode;
obtaining template information of a data file to be generated, wherein the template information is generated by a user through formatting configuration based on the data source information;
after the business data are obtained, the template information selected by the user for the business data is received, the business data are associated with the template information selected by the user, and a data file is generated.
The embodiment of the invention provides an online dynamic generation device of a data file, which is used for dynamically generating the data file online and has high efficiency, and the device comprises:
the data file analysis module is used for analyzing the data file to be generated and obtaining the data file format and the data file generation mode of the data file to be generated;
the data source information configuration module is used for acquiring data source information input by a user, and the data source information is configured and generated by the user based on the data file format and the data file generation mode;
the template information configuration module is used for obtaining template information of a data file to be generated, and the template information is generated by formatting configuration of a user based on the data source information;
and the service data association module is used for receiving the template information selected by the user for the service data after the service data is acquired, associating the service data with the template information selected by the user and generating a data file.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the online dynamic generation method of the data file when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the method for dynamically generating the data file on line is realized.
The embodiment of the invention also provides a computer program product, which comprises a computer program, and when the computer program is executed by a processor, the method for dynamically generating the data file on line is realized.
In the embodiment of the invention, a data file to be generated is analyzed, and the data file format and the data file generation mode of the data file to be generated are obtained; acquiring data source information input by a user, wherein the data source information is input by the user based on the data file format and the data file generation mode; obtaining template information of a data file to be generated, wherein the template information is generated by a user through formatting configuration based on the data source information; after acquiring the service data, receiving template information selected by a user for the service data; and associating the service data with template information selected by a user to generate a data file. Compared with the method for generating the data file by modifying the code in the prior art, the method has the advantages that the data source information and the template information are configured, after the business data are obtained, the business data can be quickly associated with the template information selected by the user to generate the data file, the code is not required to be modified frequently, the production time is reduced, and the data file generation efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
FIG. 1 is a flowchart of a method for dynamically generating a data file on line according to an embodiment of the present invention;
FIG. 2 is an interface schematic of data source information configuration in a TXT format and a SQL mode according to an embodiment of the present invention;
FIG. 3 is an interface schematic of data source information configuration in XML format and SQL mode according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a template information configuration interface in a TXT format-SQL manner according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating a template information configuration interface in a TXT format-JAVA mode according to an embodiment of the present invention;
FIG. 6 is a configuration interface for an attribute datasettype in accordance with an embodiment of the present invention;
FIG. 7 is a configuration interface for the attribute organization in the practice of the present invention;
FIG. 8 is a configuration interface for the attribute sendate in the practice of the present invention;
FIG. 9 is a configuration interface for property rows in an implementation of the present invention;
FIG. 10 is a configuration interface for attribute row in an embodiment of the present invention;
FIG. 11 is a configuration interface for attribute ids in an embodiment of the present invention;
FIG. 12 is a diagram illustrating a configuration interface of information of a newly added template according to an embodiment of the present invention;
fig. 13 is a schematic interface diagram illustrating attribute information of a newly added node in the embodiment of the present invention;
FIG. 14 is a schematic diagram of an interface for editing attribute information of a node according to an embodiment of the present invention;
FIG. 15 is a schematic diagram of an interface for associating service data with template information selected by a user according to an embodiment of the present invention;
FIG. 16 is a schematic diagram of an apparatus for dynamically generating data files on line according to an embodiment of the present invention;
FIG. 17 is a diagram of a computer device in an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
In the description of the present specification, the terms "comprising," "including," "having," "containing," and the like are used in an open-ended fashion, i.e., to mean including, but not limited to. Reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The sequence of steps involved in the embodiments is for illustrative purposes to illustrate the implementation of the present application, and the sequence of steps is not limited and can be adjusted as needed.
First, terms related to the present invention are explained.
Single attribute: refers to the type of node in an XML message, which has only one value.
And (3) cycle attribute: refers to the type of node in the XML message under which a data set is located.
Fig. 1 is a flowchart of an online dynamic generation method for a data file in an embodiment of the present invention, as shown in fig. 1, including:
step 101, analyzing a data file to be generated, and obtaining a data file format and a data file generation mode of the data file to be generated;
102, acquiring data source information input by a user, wherein the data source information is input by the user based on the data file format and the data file generation mode;
103, obtaining template information of a data file to be generated, wherein the template information is generated by a user through formatting configuration based on the data source information;
and 104, after the service data are obtained, receiving template information selected by the user for the service data, associating the service data with the template information selected by the user, and generating a data file.
In the embodiment of the invention, compared with the method for generating the data file by modifying the code in the prior art, the data file generation method has the advantages that the data source information and the template information are configured, after the business data are acquired, the business data can be quickly associated with the template information selected by the user to generate the data file, the code is not required to be frequently modified, the production time is reduced, and the data file generation efficiency is improved.
In step 101, analyzing a data file to be generated, and obtaining a data file format and a data file generation mode of the data file to be generated;
in an embodiment, the data file generation mode includes an SQL mode and a program extension mode.
In one embodiment, the data file format includes an XML format and a TXT format.
In particular, the program extension may be implemented in any language, such as JAVA.
In step 102, data source information input by a user is obtained, wherein the data source information is input by the user based on the data file format and the data file generation mode.
In one embodiment, the data source information includes a code, a name, a data file generation method, and data file access logic;
when the data file generation mode is an SQL mode, the data file access logic is an SQL statement;
and when the data file generation mode is a program extension mode, the data file access logic is an interface realized by the self-defined program code.
The data file access logic is the actual access logic of the generated data file, and directly concerns whether the data information of the system bottom layer can directly support the use of the data file, and if not, the data file access logic needs to further analyze where the missing part of data needs to be obtained.
In an embodiment, when the data file format is a TXT format, the interface realized by the custom program code includes a txtdatafile interface and a TestTXTDataFile interface;
the TXTdataFileInterface interface is used for realizing the monitoring logic of a combined monitoring level aiming at the service data, the monitoring logic of an asset monitoring level and the monitoring logic of a single-coupon monitoring level in the data file access logic.
The TestTXTDataFile interface is used for realizing the logic of a data file data source in a format of TXT to be generated in the data file access logic and the description of field information to be returned by the data file to be generated.
In one embodiment, when the format of the data file is an XML format, the interface implemented by the custom program code includes an xmldafile interface;
the XMLDataFile interface is used for realizing data file access logic.
The data source information configuration process is sequentially introduced according to different data file generation modes and data file formats.
(1) The format of the data file is TXT format, and the generation mode of the data file is SQL mode
The configuration can be performed through a functional interface for configuring the TXT format in the system, and fig. 2 is an interface schematic for performing data source information configuration in the TXT format and the SQL mode in the embodiment of the present invention.
(2) The data file format is TXT format, and the data file generating mode is program expanding mode
In the embodiment of the invention, the program expansion mode can be realized by adopting a plurality of programming languages, mainly aiming at the situation that the data logic of the TXT data file to be generated is complex and can not be directly configured and acquired in an SQL mode, secondary development needs to be realized by developers, and the invention takes a JAVA mode as an example. When data source information configuration in the TXT format and the JAVA mode is performed, the data file generation mode in fig. 2 needs to be changed to the JAVA mode, and the title "SQL" needs to be changed to a "method", where the method is implemented in getFields () in the following two interfaces, for example, a "method for acquiring 01 class male classmate information".
The TXTDataFileInterface implemented in JAVA is shown in table 1 below.
TABLE 1
Figure BDA0003648494450000051
Figure BDA0003648494450000061
The TestTXTDataFile interface implemented in JAVA is as follows in table 2.
TABLE 2
Figure BDA0003648494450000062
Figure BDA0003648494450000071
(3) The format of the data file is XML format, and the generation mode of the data file is SQL mode
The XML format is structured in a hierarchy, so that one XML format data file may need to configure a plurality of data sources, and the common XML format file is as shown in table 3 below.
TABLE 3
Figure BDA0003648494450000072
In one embodiment, the attribute types include a single attribute and a cyclic attribute;
the single attribute comprises no value, constant and variable.
In table 3, the single attribute node has: pendata (null), version (constant), sendcode (constant), senddate (variable), sendtime (variable), organization (constant), datasettype (null), typecode (variable), typename (variable), rows (null), id (variable), name (variable).
The cyclic attribute nodes are: rows (no value).
The configuration can be performed through a functional interface configured in an XML format in the system, and fig. 3 is an interface schematic diagram of data source information configuration in an XML format and an SQL mode in the embodiment of the present invention.
(4) The format of the data file is XML format, and the generation mode of the data file is program expansion mode
Here, the program extension mode is also JAVA mode as an example, and the xmldafile interface is shown in table 4 below.
TABLE 4
Figure BDA0003648494450000081
Figure BDA0003648494450000091
Figure BDA0003648494450000101
In step 103, template information of the data file to be generated is obtained, and the template information is generated by a user through formatting configuration based on the data source information.
In an embodiment, when the data file format is TXT format, the template information includes at least one of a field name, a chinese name, a field length, whether to display, sorting, a field type, a padding mode, padding characters, and precision.
Fig. 4 is a schematic diagram of a template information configuration interface in a TXT format-SQL manner according to an embodiment of the present invention, where a data source code, a data source name, a data file generation manner, and an SQL statement are information configured for a data source corresponding to fig. 2. Fig. 5 is a schematic diagram of a template information configuration interface in a TXT format-JAVA manner according to an embodiment of the present invention, where a data source code, a data source name, a data file generation manner, and a method are information configured in a data source, and a method in fig. 5 is mapped with a method implemented in TestTXTDataFile interface getfiles () in table 2.
In an embodiment, obtaining template information of a data file to be generated includes:
when the format of the data file is an XML format, acquiring attribute information of template information of the data file to be generated, wherein the attribute information is generated by a user through formatting configuration based on the data source information;
and acquiring template information of the data file to be generated, wherein the attribute information is generated by formatting configuration of a user based on the attribute information.
That is, when configuring the template information in the XML format, it is necessary to configure the attribute information first and then configure the template information.
In an embodiment, when the format of the data file is XML format, the attribute information at least includes one of an attribute code, an attribute identifier, an attribute type, an attribute value, a data set, a mapping field, and an attribute description.
Taking the XML format file represented in table 3 as an example, fig. 6 is a configuration interface of the attribute datasettype in the embodiment of the present invention, where the attribute type of the datasettype is a single attribute and the attribute value type is a null value. Fig. 7 is a configuration interface of the attribute organization in the embodiment of the present invention, the attribute type of the organization is a single attribute, and the attribute value type is a constant. FIG. 8 is a configuration interface of attribute sendate in the embodiment of the present invention, where the attribute type of sendate is single attribute and the attribute value type is variable, and since sendate has a specific format and data is taken from a specific dataset, the dataset of the attribute is "sendate-SQL mode", refers to the name of the pre-registered dataset, and represents the dataset sendate identified in SQL mode, and the mapping field is "sendate", which is consistent with Table 3. Fig. 9 is a configuration interface of the property rows in the embodiment of the present invention, where the property type of the row is a loop property, and the property value type is no value, and the name of the data set registered in advance is referred to by the data set in the loop property, for example, "student information — SQL manner", which represents "student information" represented in SQL manner, corresponds to the loop setting of the row in table 3. Fig. 10 is a configuration interface of an attribute row in the embodiment of the present invention, where the attribute type of the row is a single attribute, the attribute type is null, and the row is a single loop in a loop body row. FIG. 11 is a configuration interface of an attribute id according to an embodiment of the present invention, where an attribute type of the id is a single attribute, an attribute value type is a variable, a dataset of the id is derived from a loop body rows, each row in the loop body has multiple fields, and multiple fields, such as id and name, can be taken by the loop body.
After the attribute information is configured, the template information is configured, and fig. 12 is a schematic diagram of a configuration interface of the newly added template information in the embodiment of the present invention. Clicking the newly added node in fig. 12 can perform attribute configuration on the child node under the current node, where the attribute in fig. 12 corresponds to that in table 3, and fig. 13 is an interface schematic diagram of the attribute information of the newly added node in the embodiment of the present invention. Clicking the edit in fig. 12 can edit the attribute information of the current node, as shown in fig. 14, which is an interface diagram of the attribute information of the edit node in the embodiment of the present invention.
In step 104, after the service data is obtained, the template information selected by the user for the service data is received, and the service data is associated with the template information selected by the user to generate a data file.
Specifically, the business data may be portfolio information. Fig. 15 is a schematic interface diagram illustrating a process of associating service data with template information selected by a user according to an embodiment of the present invention. The business data takes investment portfolio as an example, the format of the selected data file is XML format, and the template information is XXX1 template.
In summary, in the method provided in the embodiment of the present invention, the data file to be generated is analyzed, and the data file format and the data file generation manner of the data file to be generated are obtained; acquiring data source information input by a user, wherein the data source information is input by the user based on the data file format and the data file generation mode; obtaining template information of a data file to be generated, wherein the template information is generated by a user through formatting configuration based on the data source information; after acquiring the service data, receiving template information selected by a user for the service data; and associating the service data with template information selected by a user to generate a data file. Compared with the method for generating the data file by modifying the code in the prior art, the method has the advantages that the data source information and the template information are configured, after the business data are obtained, the business data can be quickly associated with the template information selected by the user to generate the data file, the code is not required to be modified frequently, the production time is reduced, and the data file generation efficiency is improved.
The embodiment of the invention also provides a device for dynamically generating the data file on line, which has a principle similar to that of a method for dynamically generating the data file on line and is not repeated herein.
Fig. 16 is a schematic diagram of an online dynamic generation apparatus for data files in an embodiment of the present invention, including:
the data file analysis module 1601 is configured to analyze a data file to be generated, and obtain a data file format and a data file generation mode of the data file to be generated;
a data source information configuration module 1602, configured to obtain data source information input by a user, where the data source information is configured and generated by the user based on the data file format and the data file generation manner;
a template information configuring module 1603, configured to obtain template information of the data file to be generated, where the template information is generated by a user through formatting configuration based on the data source information;
the service data association module 1604 is configured to receive template information selected by the user for the service data after the service data is obtained, associate the service data with the template information selected by the user, and generate a data file.
In an embodiment, the data file generation mode includes an SQL mode and a program extension mode.
In one embodiment, the data file format includes an XML format and a TXT format.
In one embodiment, the data source information includes a code, a name, a data file generation method, and data file access logic;
when the data file generation mode is an SQL mode, the data file access logic is an SQL statement;
and when the data file generation mode is a program extension mode, the data file access logic is an interface realized by the self-defined program code.
In an embodiment, when the data file format is a TXT format, the interface realized by the custom program code includes a TXTDataFileInterface and a TXTDataFileInterface;
the TXTdataFileInterface interface is used for realizing the monitoring logic of a combined monitoring level aiming at the service data, the monitoring logic of an asset monitoring level and the monitoring logic of a single-coupon monitoring level in the data file access logic.
The TXTdataFileInterface interface is used for realizing the logic of a data source of a data file in a TXT format to be generated in the data file access logic and the description of field information to be returned by the data file to be generated.
In one embodiment, when the format of the data file is an XML format, the interface implemented by the custom program code includes an xmldafile interface;
the XMLDataFile interface is used for realizing data file access logic.
In an embodiment, when the data file format is TXT format, the template information includes at least one of a field name, a chinese name, a field length, whether to display, sorting, a field type, a padding mode, padding characters, and precision.
In an embodiment, the template information configuration module is specifically configured to:
when the format of the data file is an XML format, acquiring attribute information of template information of the data file to be generated, wherein the attribute information is generated by a user through formatting configuration based on the data source information;
and acquiring template information of the data file to be generated, wherein the attribute information is generated by formatting configuration of a user based on the attribute information.
In an embodiment, when the format of the data file is XML format, the attribute information at least includes one of an attribute code, an attribute identifier, an attribute type, an attribute value, a data set, a mapping field, and an attribute description.
In one embodiment, the attribute types include a single attribute and a cyclic attribute;
the single attribute comprises no value, constant and variable.
In summary, in the apparatus provided in the embodiment of the present invention, the data file analyzing module is configured to analyze the data file to be generated, and obtain a data file format and a data file generating manner of the data file to be generated; the data source information configuration module is used for acquiring data source information input by a user, and the data source information is configured and generated by the user based on the data file format and the data file generation mode; the template information configuration module is used for obtaining template information of a data file to be generated, and the template information is generated by formatting configuration of a user based on the data source information; and the service data association module is used for receiving the template information selected by the user for the service data after the service data is acquired, associating the service data with the template information selected by the user and generating a data file. Compared with the method for generating the data file by modifying the code in the prior art, the method has the advantages that the data source information and the template information are configured, after the business data are obtained, the business data can be quickly associated with the template information selected by the user to generate the data file, the code is not required to be modified frequently, the production time is reduced, and the data file generation efficiency is improved.
Fig. 17 is a schematic diagram of a computer device according to an embodiment of the present invention, where the computer device 1700 includes a memory 1710, a processor 1720, and a computer program 1730 stored in the memory 1710 and operable on the processor 1720, and when the processor 1720 executes the computer program 1730, the method for dynamically generating a data file online is implemented.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the method for dynamically generating the data file on line is realized.
The embodiment of the invention also provides a computer program product, which comprises a computer program, and when the computer program is executed by a processor, the method for dynamically generating the data file on line is realized.
It will be appreciated by one skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program service system embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program business systems according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (14)

1. A method for dynamically generating a data file on line is characterized by comprising the following steps:
analyzing the data file to be generated, and obtaining the data file format and the data file generation mode of the data file to be generated;
acquiring data source information input by a user, wherein the data source information is input by the user based on the data file format and the data file generation mode;
obtaining template information of a data file to be generated, wherein the template information is generated by a user through formatting configuration based on the data source information;
after the business data are obtained, the template information selected by the user for the business data is received, the business data are associated with the template information selected by the user, and a data file is generated.
2. The method of claim 1, wherein the data file generation approach comprises an SQL approach and a procedural extension approach.
3. The method of claim 1, wherein the data file format comprises an XML format and a TXT format.
4. The method of claim 1, wherein the data source information includes a code, a name, a data file generation method, and data file access logic;
when the data file generation mode is an SQL mode, the data file access logic is an SQL statement;
and when the data file generation mode is a program extension mode, the data file access logic is an interface realized by the self-defined program code.
5. The method of claim 4, wherein when the data file format is a TXT format, the interfaces implemented by the custom program code include a TXTDataFileInterface and a TestTXTDataFile interface;
the TXTTDataFileInterface interface is used for realizing the monitoring logic of a combined monitoring level aiming at the service data, the monitoring logic of an asset monitoring level and the monitoring logic of a single-coupon monitoring level in the data file access logic;
the TestTXTDataFile interface is used for realizing the logic of a data file data source in a format of TXT to be generated in the data file access logic and the description of field information to be returned by the data file to be generated.
6. The method of claim 4, wherein when the data file format is an XML format, the interface implemented by the custom program code comprises an xmldafile interface;
the XMLDataFile interface is used for realizing data file access logic.
7. The method of claim 1, wherein the template information includes at least one of a field name, a chinese name, a field length, whether to display, sorting, a field type, a padding mode, padding characters, and precision when the data file format is TXT format.
8. The method of claim 1, wherein obtaining template information for a data file to be generated comprises:
when the format of the data file is an XML format, obtaining attribute information of template information of the data file to be generated, wherein the attribute information is generated by a user through formatting configuration based on the data source information;
and acquiring template information of the data file to be generated, wherein the attribute information is generated by formatting configuration of a user based on the attribute information.
9. The method of claim 8, wherein the attribute information includes at least one of an attribute code, an attribute identifier, an attribute type, an attribute value, a data set, a mapping field, and an attribute description when the data file format is XML format.
10. The method of claim 9, wherein the attribute types include a single attribute and a cyclic attribute;
the single attribute comprises no value, constant and variable.
11. An online dynamic generation device for data files, comprising:
the data file analysis module is used for analyzing the data file to be generated and obtaining the data file format and the data file generation mode of the data file to be generated;
the data source information configuration module is used for acquiring data source information input by a user, and the data source information is configured and generated by the user based on the data file format and the data file generation mode;
the template information configuration module is used for obtaining template information of a data file to be generated, and the template information is generated by formatting configuration of a user based on the data source information;
and the service data association module is used for receiving the template information selected by the user for the service data after the service data is acquired, associating the service data with the template information selected by the user and generating a data file.
12. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 10 when executing the computer program.
13. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any one of claims 1 to 10.
14. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, carries out the method of any one of claims 1 to 10.
CN202210541418.8A 2022-05-17 2022-05-17 Online dynamic generation method and device for data file Pending CN114860668A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210541418.8A CN114860668A (en) 2022-05-17 2022-05-17 Online dynamic generation method and device for data file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210541418.8A CN114860668A (en) 2022-05-17 2022-05-17 Online dynamic generation method and device for data file

Publications (1)

Publication Number Publication Date
CN114860668A true CN114860668A (en) 2022-08-05

Family

ID=82638382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210541418.8A Pending CN114860668A (en) 2022-05-17 2022-05-17 Online dynamic generation method and device for data file

Country Status (1)

Country Link
CN (1) CN114860668A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116401218A (en) * 2023-06-08 2023-07-07 天津金城银行股份有限公司 File export method and terminal equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116401218A (en) * 2023-06-08 2023-07-07 天津金城银行股份有限公司 File export method and terminal equipment
CN116401218B (en) * 2023-06-08 2023-09-19 天津金城银行股份有限公司 File export method and terminal equipment

Similar Documents

Publication Publication Date Title
US11366856B2 (en) System and method for updating target schema of graph model
CN107251021B (en) Filtering data lineage graph
CN104035754A (en) XML (Extensible Markup Language)-based custom code generation method and generator
CN105335477B (en) A kind of operating method and device of database
CN104536987B (en) A kind of method and device for inquiring about data
CN107103035B (en) Local table data updating method and device
CN105302803A (en) Product BOM difference analyzing and synchronous updating method
CN110866029A (en) sql statement construction method, device, server and readable storage medium
CN111611441B (en) Heterogeneous data processing method and device and computer equipment
CN104408118A (en) Database establishing method and device
CN114860668A (en) Online dynamic generation method and device for data file
CN109992585A (en) Data lead-in method for office management system
CN113703755A (en) Code generation method and code generation device
CN111984745B (en) Database field dynamic expansion method, device, equipment and storage medium
CN113704343A (en) Data blood margin visualization implementation method and system in data processing
CN116225455B (en) Method for rapidly generating statistical analysis report
CN112825068B (en) Data blood margin generation method and device
CN114995877B (en) Variable configuration method and device
CN106257443A (en) A kind of data lead-in method and device
CN108241624B (en) Query script generation method and device
CN108228161B (en) System and method for extending structured command line
CN114996246A (en) Data cleaning method for checking multiple fields of table based on NiFi assembly
CN111352824B (en) Test method and device and computer equipment
CN113792067A (en) System and method for automatically generating SQL (structured query language) based on recursive algorithm
CN113342399A (en) Application structure configuration method and device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination