CN111447268A - File structure conversion method, device, equipment and storage medium - Google Patents

File structure conversion method, device, equipment and storage medium Download PDF

Info

Publication number
CN111447268A
CN111447268A CN202010214662.4A CN202010214662A CN111447268A CN 111447268 A CN111447268 A CN 111447268A CN 202010214662 A CN202010214662 A CN 202010214662A CN 111447268 A CN111447268 A CN 111447268A
Authority
CN
China
Prior art keywords
file
node
mounting
content
matched
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.)
Granted
Application number
CN202010214662.4A
Other languages
Chinese (zh)
Other versions
CN111447268B (en
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
CCB Finetech Co 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202010214662.4A priority Critical patent/CN111447268B/en
Publication of CN111447268A publication Critical patent/CN111447268A/en
Application granted granted Critical
Publication of CN111447268B publication Critical patent/CN111447268B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a file structure conversion method, a file structure conversion device, file structure conversion equipment and a storage medium. The file structure conversion method comprises the following steps: determining a configuration file matched with the file to be converted according to the file type of the file to be converted; the configuration file comprises mounting nodes with preset structures, and the preset structures of the mounting nodes are determined in advance according to the content of the file message; matching the content to be matched in the file to be converted with the mount node of the configuration file, and determining a target mount node of the content to be matched; and mounting the content to be matched to a target mounting node to generate a target file with a converted structure. The readability of the message content in the file is improved by automatically converting the structure of the file to be converted, and the file structure conversion method supports the random superposition and nesting of the message content in the file, so that the universality of structure conversion is improved; and high availability of data file transmission is realized through structure conversion, and data consistency is ensured.

Description

File structure conversion method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a file structure conversion method, a file structure conversion device, file structure conversion equipment and a storage medium.
Background
SWIFT (Society for world Wide Interbank financial telecommunications Society), an international organization of collaboration between international banking industries, has been used by most banks in most countries around the world. The use of SWIFT makes the bank settlement provide safe, reliable, fast, standardized and automatic communication service, thereby greatly improving the settlement speed of the bank. Because the format of SWIFT has standardization, the format of the letter of credit is mainly the message of SWIFT.
The contracted bank sends a statement to a host foreign bank in the region or the global headquarter location in an MT940(Message Type) Message format every day in an SWIFT mode, the headquarter of a multinational enterprise inquires account information of a subsidiary company in time through an electronic bank platform of the host foreign bank, and each occurrence of a service occupies one piece of information of the Message.
In the SWIFT message, the cycle of the service is presented in a one-dimensional structure, which brings difficulty to message analysis and has poor readability.
Disclosure of Invention
The embodiment of the invention provides a file structure conversion method, a file structure conversion device, equipment and a storage medium, and aims to improve the readability of a message file structure.
In a first aspect, an embodiment of the present invention provides a file structure conversion method, including:
determining a configuration file matched with the file to be converted according to the file type of the file to be converted; the configuration file comprises mounting nodes with preset structures, and the preset structures of the mounting nodes are determined in advance according to file message contents;
matching the content to be matched in the file to be converted with the mount node of the configuration file, and determining a target mount node of the content to be matched;
and mounting the content to be matched to the target mounting node to generate a target file with a converted structure.
In a second aspect, an embodiment of the present invention further provides a file structure conversion apparatus, including:
the configuration file determining module is used for determining a configuration file matched with the file to be converted according to the file type of the file to be converted; the configuration file comprises mounting nodes with preset structures, and the preset structures of the mounting nodes are determined in advance according to file message contents;
the target mounting node determining module is used for matching the content to be matched in the file to be converted with the mounting node of the configuration file and determining the target mounting node of the content to be matched;
and the target file generation module is used for mounting the content to be matched to the target mounting node so as to generate a target file after structure conversion.
In a third aspect, an embodiment of the present invention further provides an apparatus, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the file structure conversion method according to any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the file structure conversion method according to any embodiment of the present invention.
The method and the device for generating the target file determine the target mounting node of the content to be matched in the file to be converted based on the configuration file matched with the file type of the file to be converted, mount the content to be matched on the target mounting node, realize the structure conversion of the file to be converted and generate the target file. The readability of the message content in the file is improved by automatically converting the structure of the file to be converted, and the file structure conversion method supports the random superposition and nesting of the message content in the file, so that the universality of structure conversion is improved; and high availability of data file transmission is realized through structure conversion, and data consistency is ensured.
Drawings
FIG. 1 is a flowchart of a file structure conversion method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a file structure conversion method according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a file structure conversion apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a file structure conversion method in the first embodiment of the present invention, and this embodiment is applicable to the case of performing structure conversion on a SWIFT message. The method may be performed by a file structure conversion apparatus, which may be implemented in software and/or hardware and may be configured in a device, for example, a device with communication and computing capabilities such as a background server. As shown in fig. 1, the method specifically includes:
step 101, determining a configuration file matched with a file to be converted according to the file type of the file to be converted; the configuration file comprises a mounting node with a preset structure, and the preset structure of the mounting node is determined in advance according to the content of the file message.
The file to be converted refers to a file for transmitting the content of the message in a SWIFT manner, for example, a signed bank sends a statement of account to a host foreign bank in the local or global headquarters location in an MT940 message format every day in a SWIFT manner, and the MT940 message is the file to be converted. The file type is used to indicate a specific classification of the message content, e.g., MT940 messages in the above example are one file type and MT103 for a remittance indication for a single customer is another file type. Different message node representations exist in different file types, namely different file types correspond to different configuration files. The configuration file is used for representing message nodes in the message content and representing the relationship between the message nodes, so that the file to be converted can convert the content structure according to the configuration file. The mounting nodes in the configuration file are used for specifically representing the message nodes in the message content, and the hierarchical relationship of the mounting nodes is represented in the configuration file, so that the hierarchical relationship between the message nodes in the file to be converted is represented.
Illustratively, in the SWIFT message, the loop for the service is presented in a one-dimensional structure, that is, each service occupies one piece of information of the message content, and when the content in the loop structure formed by a plurality of pieces of information is excessive, or the loop content exists in the message content in an overlapping or nested manner, the loop structure in the SWIFT message is difficult to be visually presented, which is not beneficial to the user to view the content.
Specifically, a specific file type of the file to be converted is determined, a corresponding configuration file is determined according to the file type, for example, a preset association relationship exists between the file type and the configuration file, and the configuration file matched with the file to be converted is determined according to the association relationship. The configuration file comprises mounting nodes determined according to the relation between the contents of the file messages, and the hierarchical relation between the mounting nodes is also determined.
In the embodiment of the present invention, optionally, the configuration file is determined through the following steps:
determining all message nodes in the basic file; the message nodes at least comprise message node contents and message node attributes; establishing a mapping relation between the content of the message node and the matched object according to the attribute of the message node; determining mounting nodes formed by matching objects and a hierarchical relationship between the mounting nodes according to the mapping relationship and the message node attribute; and generating a configuration file according to the mounting nodes and the hierarchical relation between the mounting nodes.
The configuration file is preset according to the content in the basic file. Each file type corresponds to a basic file, and the configuration file corresponding to the file type can be predetermined according to the basic file. And the basic file comprises all message nodes appearing in the file type, so that the configuration file comprises mounting nodes corresponding to all the message nodes, and the problem of wrong conversion of the structure of the file to be converted caused by missing of the message nodes is avoided.
The message node consists of a node name, a node code number and a clause content; the message node is also called a message column, the node name refers to the specific meaning of the node, the node code refers to the code simply expressed in the message, and the clause content refers to the specific content information of the node. Illustratively, for the MT940 in which 61 is a message node, the message node represents a piece of bank reconciliation information, the node number is 61, and the clause content is represented by the content following 61. The message node contents in the message nodes refer to node codes and clause contents; for the message node attribute, the node name is referred, and the relationship between the nodes can be determined according to the node name.
The matching object is an object in a target file after the structure of the file to be converted is converted, illustratively, the SWIFT message format is converted into the Java format, and the matching object establishing the mapping relationship with the message node content is the Java object. For a message content, the message content is composed of a plurality of message nodes, each message node is converted into a mapped matching object, and the matching object constitutes a mounting node of the message content. And the hierarchical relationship of the mounting nodes inherits the hierarchical relationship between the message nodes in the corresponding message content, and the generated configuration file can be determined according to the determined mounting nodes and the hierarchical relationship between the mounting nodes.
Illustratively, mapping relationships between all message nodes in the SWIFT message and the Java object are configured, and the configuration structure is configured in a mounting manner, where mounting means that the message nodes in the SWIFT message are connected to objects in Java, and completing accessing the Java object is equivalent to accessing the corresponding message nodes. The relation between the mounting nodes is determined according to the relation between the message nodes in the mounting mode, so that the simple MT message columns, the combined MT message columns and the MT circular message columns are unified into the mounting mode for configuration. The configuration file is designed in a mounting mode, so that the file to be converted is converted according to the configuration file, the readability of the file structure after conversion can be improved, and the user can conveniently check the file structure.
And 102, matching the content to be matched in the file to be converted with the mount node of the configuration file, and determining a target mount node of the content to be matched.
The content to be matched in the file to be converted refers to each message content in the file to be converted, each message content is matched with each mounting node in the configuration file, and if the mounting node which is successfully matched exists, the mounting node is indicated as a target mounting node of the message content; and if the successfully matched mounting node does not exist, indicating that the configuration is wrong or the input message is wrong.
In this embodiment of the present invention, optionally, matching the content to be matched in the file to be converted with the mount node of the configuration file, and determining the target mount node of the content to be matched includes:
sequentially taking each message node of the content to be matched in the file to be converted as a unit, and determining a matching object result mapped by the content to be matched according to the mapping relation between the content of the message node and the matching object; and matching the matching object result with the mounting node of the configuration file to determine a target mounting node of the content to be matched.
Reading each message node in sequence according to the sequence of each content to be matched in the file to be converted; and sequentially converting each message node into a corresponding mapping matching object according to the mapping relation between the message node and the matching object in the configuration file, and forming a matching object result of the content to be matched by all the matching objects determined by each content to be matched. And matching with the mounting node according to the matching object result, wherein the mounting node is also composed of a plurality of matching objects, when the matching object result of the content to be matched is the same as any mounting node, the matching is successful, and the mounting node is the target mounting node of the content to be matched.
Illustratively, the mount node claims MT message node design in turn, and takes the MT message node as a unit to parse an input MT message into a two-dimensional structure corresponding to a configuration file. And sequentially claiming the one-dimensional structure of the MT message nodes according to the mapping mount definition of the MT message nodes and the Java objects, and if the one-dimensional structure of the MT message nodes is not claimed, considering that the configuration is wrong or the input message is wrong.
In the embodiment of the present invention, optionally, the hierarchical relationship of the mount nodes at least includes an upper-lower level relationship and a parallel relationship.
Correspondingly, matching the content to be matched in the file to be converted with the mount node of the configuration file, and determining the target mount node of the content to be matched, including:
matching the content to be matched in the file to be converted with all the sub mount nodes of the target mount node of the previous content to be matched, and if the sub mount nodes are successfully matched, determining the matched mount nodes as the sub mount nodes; and if the matching fails, matching the content to be matched in the file to be converted with all the same-level mounting nodes of the target mounting node of the previous content to be matched, and if the matching of the same-level mounting nodes is successful, determining the matched mounting nodes as the same-level mounting nodes.
The hierarchical relation of the mounting nodes is used for visually representing the circulating structure, and comprises a superior-subordinate relation and a parallel relation. The upper and lower level relation means that the two mounting nodes are in an inclusion relation, the corresponding message node information is also in an inclusion relation, the mounting nodes in the upper and lower level relation are a father mounting node and a son mounting node, and at least one son mounting node exists for one father mounting node; the parallel relation means that the message node information of the two mounting node identifications are of the same type, and the mounting nodes in the parallel relation are the same-level mounting nodes.
Specifically, the child mount node of the target mount node of the previous content to be matched matches the MT message node preferentially over the mount nodes of the same level, that is, when the child mount node and the mount node of the same level exist at the same time, the child mount node matches the MT message node preferentially, and when the child mount node fails to match, the peer node continues to match the MT message column.
Because the configuration is carried out in the configuration file in a mounting mode, if the sequential matching is directly carried out according to the sequence of the mounting nodes, the matching efficiency is influenced; the matching priority of the sub mounting node of the target mounting node of the determined previous content to be matched and the mounting nodes at the same level is set, so that the mounting structure can be quickly formed, and the matching efficiency is improved.
And 103, mounting the content to be matched to the target mounting node to generate a target file with a converted structure.
After a target mounting node of the content to be matched is determined, the content to be matched is mounted on the target mounting node, so that the content to be matched can be viewed through the target mounting node, and after all the content to be matched in the file to be converted is mounted, a final target file subjected to structure conversion is generated. The target file generated in the mounting mode not only ensures the conversion of the file structure, but also improves the viewing efficiency of the file; and the consistency of the file content is ensured, and the accurate analysis of the file to be converted is realized.
The method and the device for generating the target file determine the target mounting node of the content to be matched in the file to be converted based on the configuration file matched with the file type of the file to be converted, mount the content to be matched on the target mounting node, realize the structure conversion of the file to be converted and generate the target file. The readability of the message content in the file is improved by automatically converting the structure of the file to be converted, and the file structure conversion method supports the random superposition and nesting of the message content in the file, so that the universality of structure conversion is improved; and high availability of data file transmission is realized through structure conversion, and data consistency is ensured.
Example two
Fig. 2 is a flowchart of a file structure conversion method in the second embodiment of the present invention, and the second embodiment of the present invention is further optimized based on the first embodiment of the present invention. As shown in fig. 2, the method includes:
step 201, determining a configuration file matched with a file to be converted according to the file type of the file to be converted; the configuration file comprises a mounting node with a preset structure, and the preset structure of the mounting node is determined in advance according to the content of the file message.
Step 202, matching the content to be matched in the file to be converted with the mount node of the configuration file, and determining the target mount node of the content to be matched.
Step 203, determining whether the target mount node is the final sub mount node, if yes, executing step 204, otherwise, executing step 205.
The final sub mount node is a mount node without the sub mount node, and is the deepest node of the mount structure. When the message nodes are analyzed, a delegation mechanism is adopted, and different delegation mechanisms can be determined through the judgment of the final sub-mount nodes, so that the accuracy of message content analysis is improved.
When the target mounting node is the final sub-mounting node, the target mounting node indicates that the content to be matched corresponding to the target mounting node does not contain information of other message nodes; when the target mount node is not the final sub mount node, it indicates that the content to be matched corresponding to the target mount node contains information of other message nodes, and a delegation mechanism is required to be adopted to ensure the accuracy of the analysis content.
Step 204, determining an attribute value of the target mounting node according to the content to be matched; and generating a target file with a converted structure according to the target mounting node and the attribute value.
When the target mounting node is the final sub-mounting node, the specific value corresponding to each matching object in the target mounting node is determined according to the content to be matched of the target mounting node, and the specific value is set as the attribute value of each matching object of the target mounting node, namely, the specific value of the message node mapped by the matching object is checked through checking the attribute value of the matching object in the target mounting node, so that the structure conversion of the content to be matched is completely completed in a mounting mode.
And after the attribute values of all the final sub mounting nodes are set, generating a target file with a converted structure by the target mounting node matched with the content to be matched.
Illustratively, if the target mount node is the final sub-mount node, the MT message string is intercepted according to the type and length of the message node corresponding to the mount node in the configuration file, the string is converted into the configured Java type, and the converted value is set to the corresponding Java object attribute. The specific content represented by the MT message character string is intercepted and corresponds to the mounting node in the file to be converted; the converted value is the value of the message node; the Java object is the matching object mapped by the message node.
Step 205, determining the entrusted mount content in the file to be converted according to the configuration file; and entrusting the entrusting mounting content to the sub mounting node of the target mounting node for conversion, and judging whether the sub mounting node is the final sub mounting node or not.
When the target mount node is not the final sub mount node, determining the message node content in the file to be converted under the target mount node according to the configuration of the target mount node in the configuration file, using the message node content as the entrusted mount content, entrusting the message node content to the sub mount node of the target mount node for matching, if the sub mount node of the target mount node is successfully matched with the message node in the entrusted mount content, determining that the sub mount node is a new target mount node, and executing the content of step 203. The hierarchical relationship of the contents to be matched in the contents to be converted is determined through the hierarchical relationship of the mounting nodes and the entrusting mechanism, and the consistency of the contents after entrusting conversion is ensured.
Illustratively, if the target mount node is not the final sub mount node, initializing the Java object mapped with the packet node according to the Java object structure mapped with the packet node in the configuration file, and using the corresponding MT packet node character string and the initialized Java object as input parameters, delegating the sub mount node of the target mount node to perform parsing, and performing a new round of judgment on whether the target mount node is the final sub mount node. The structure conversion of the file to be converted is realized through the progressive hierarchical relationship, the one-dimensional structure displayed by the content in the file to be converted is converted into the two-dimensional structure displayed in the target file in a mounting mode, and the readability of the circulating content of the message in the file is improved.
According to the embodiment of the invention, whether the matched target mount node is the final sub mount node is judged, so that the structure conversion of the contents to be matched in the files to be converted is completed by adopting a delegation mechanism, and the efficiency and the accuracy of the structure conversion are improved. And the accuracy of determining the hierarchical relationship of the file to be converted is realized through an entrusting mechanism, the problem of mismatching is avoided, and the consistency of the content of the target file after structure conversion and the content of the file to be converted is improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a file structure conversion apparatus in a third embodiment of the present invention, which is applicable to a case of performing structure conversion on a SWIFT message. As shown in fig. 3, the apparatus includes:
a configuration file determining module 310, configured to determine, according to the file type of the file to be converted, a configuration file matched with the file to be converted; the configuration file comprises mounting nodes with preset structures, and the preset structures of the mounting nodes are determined in advance according to file message contents;
a target mount node determining module 320, configured to match a to-be-matched content in a to-be-converted file with a mount node of the configuration file, and determine a target mount node of the to-be-matched content;
and a target file generating module 330, configured to mount the content to be matched to the target mount node, so as to generate a target file after structure conversion.
The method and the device for generating the target file determine the target mounting node of the content to be matched in the file to be converted based on the configuration file matched with the file type of the file to be converted, mount the content to be matched on the target mounting node, realize the structure conversion of the file to be converted and generate the target file. The readability of the message content in the file is improved by automatically converting the structure of the file to be converted, and the file structure conversion method supports the random superposition and nesting of the message content in the file, so that the universality of structure conversion is improved; and high availability of data file transmission is realized through structure conversion, and data consistency is ensured.
Optionally, the apparatus further includes a configuration file generating module, specifically configured to:
determining all message nodes in the basic file; the message nodes at least comprise message node contents and message node attributes;
establishing a mapping relation between the content of the message node and the matched object according to the attribute of the message node;
determining mounting nodes formed by matching objects and a hierarchical relationship between the mounting nodes according to the mapping relationship and the message node attribute;
and generating a configuration file according to the mounting nodes and the hierarchical relation between the mounting nodes.
Optionally, the target mount node determining module 320 is specifically configured to:
sequentially taking each message node of the content to be matched in the file to be converted as a unit, and determining a matching object result mapped by the content to be matched according to the mapping relation between the content of the message node and the matching object;
and matching the matching object result with the mounting node of the configuration file to determine a target mounting node of the content to be matched.
Optionally, the target file generating module 330 is specifically configured to:
if the target mounting node is the final sub-mounting node, determining the attribute value of the target mounting node according to the content to be matched;
and generating a target file with a converted structure according to the target mounting node and the attribute value.
Optionally, the target file generating module 330 is specifically configured to:
if the target mounting node is not the final sub-mounting node, determining entrusted mounting content in the file to be converted according to the configuration file;
and entrusting the entrusting mounting content to the sub mounting node of the target mounting node for conversion, and judging whether the sub mounting node is the final sub mounting node or not.
Optionally, the hierarchical relationship of the mounted nodes at least includes an upper-level relationship, a lower-level relationship and a parallel relationship;
correspondingly, the target mount node determining module 320 is specifically configured to:
matching the content to be matched in the file to be converted with all the sub mount nodes of the target mount node of the previous content to be matched, and if the sub mount nodes are successfully matched, determining the matched mount nodes as the sub mount nodes;
and if the matching fails, matching the content to be matched in the file to be converted with all the same-level mounting nodes of the target mounting node of the previous content to be matched, and if the matching of the same-level mounting nodes is successful, determining the matched mounting nodes as the same-level mounting nodes.
The file structure conversion device provided by the embodiment of the invention can execute the file structure conversion method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the file structure conversion method.
Example four
Fig. 4 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention. Fig. 4 illustrates a block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention. The device 12 shown in fig. 4 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present invention.
As shown in FIG. 4, device 12 is in the form of a general purpose computing device. The components of device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory device 28, and a bus 18 that couples various system components including the system memory device 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory device bus or memory device controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system storage 28 may include computer system readable media in the form of volatile storage, such as Random Access Memory (RAM)30 and/or cache storage 32. Device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Storage 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in storage 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the device 12, and/or any device (e.g., network card, modem, etc.) that enables the device 12 to communicate with one or more other computing devices, such communication may occur via input/output (I/O) interfaces 22. furthermore, device 12 may also communicate with one or more networks (e.g., local area network (L AN), Wide Area Network (WAN) and/or a public network, such as the Internet) via network adapter 20. As shown in FIG. 4, network adapter 20 communicates with the other modules of device 12 via bus 18. it should be appreciated that, although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with device 12, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system storage device 28, for example, implementing a file structure conversion method provided by an embodiment of the present invention, including:
determining a configuration file matched with the file to be converted according to the file type of the file to be converted; the configuration file comprises mounting nodes with preset structures, and the preset structures of the mounting nodes are determined in advance according to file message contents;
matching the content to be matched in the file to be converted with the mount node of the configuration file, and determining a target mount node of the content to be matched;
and mounting the content to be matched to the target mounting node to generate a target file with a converted structure.
EXAMPLE five
The fifth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the file structure conversion method provided in the fifth embodiment of the present invention, and the method includes:
determining a configuration file matched with the file to be converted according to the file type of the file to be converted; the configuration file comprises mounting nodes with preset structures, and the preset structures of the mounting nodes are determined in advance according to file message contents;
matching the content to be matched in the file to be converted with the mount node of the configuration file, and determining a target mount node of the content to be matched;
and mounting the content to be matched to the target mounting node to generate a target file with a converted structure.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including AN object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A file structure conversion method, comprising:
determining a configuration file matched with the file to be converted according to the file type of the file to be converted; the configuration file comprises mounting nodes with preset structures, and the preset structures of the mounting nodes are determined in advance according to file message contents;
matching the content to be matched in the file to be converted with the mount node of the configuration file, and determining a target mount node of the content to be matched;
and mounting the content to be matched to the target mounting node to generate a target file with a converted structure.
2. The method of claim 1, wherein the configuration file is determined by:
determining all message nodes in the basic file; the message nodes at least comprise message node contents and message node attributes;
establishing a mapping relation between the content of the message node and the matched object according to the attribute of the message node;
determining mounting nodes formed by matching objects and a hierarchical relationship between the mounting nodes according to the mapping relationship and the message node attribute;
and generating a configuration file according to the mounting nodes and the hierarchical relation between the mounting nodes.
3. The method according to claim 2, wherein matching the content to be matched in the file to be converted with the mount node of the configuration file, and determining the target mount node of the content to be matched comprises:
sequentially taking each message node of the content to be matched in the file to be converted as a unit, and determining a matching object result mapped by the content to be matched according to the mapping relation between the content of the message node and the matching object;
and matching the matching object result with the mounting node of the configuration file to determine a target mounting node of the content to be matched.
4. The method according to claim 1, wherein mounting the content to be matched to the target mounting node to generate a structure-converted target file comprises:
if the target mounting node is the final sub-mounting node, determining the attribute value of the target mounting node according to the content to be matched;
and generating a target file with a converted structure according to the target mounting node and the attribute value.
5. The method according to claim 1, wherein mounting the content to be matched to the target mounting node to generate a structure-converted target file comprises:
if the target mounting node is not the final sub-mounting node, determining entrusted mounting content in the file to be converted according to the configuration file;
and entrusting the entrusting mounting content to the sub mounting node of the target mounting node for conversion, and judging whether the sub mounting node is the final sub mounting node or not.
6. The method according to claim 1, wherein the hierarchical relationship of the mounted nodes at least comprises a top-bottom relationship and a parallel relationship;
correspondingly, matching the content to be matched in the file to be converted with the mount node of the configuration file, and determining the target mount node of the content to be matched, including:
matching the content to be matched in the file to be converted with all the sub mount nodes of the target mount node of the previous content to be matched, and if the sub mount nodes are successfully matched, determining the matched mount nodes as the sub mount nodes;
and if the matching fails, matching the content to be matched in the file to be converted with all the same-level mounting nodes of the target mounting node of the previous content to be matched, and if the matching of the same-level mounting nodes is successful, determining the matched mounting nodes as the same-level mounting nodes.
7. A file structure conversion apparatus, comprising:
the configuration file determining module is used for determining a configuration file matched with the file to be converted according to the file type of the file to be converted; the configuration file comprises mounting nodes with preset structures, and the preset structures of the mounting nodes are determined in advance according to file message contents;
the target mounting node determining module is used for matching the content to be matched in the file to be converted with the mounting node of the configuration file and determining the target mounting node of the content to be matched;
and the target file generation module is used for mounting the content to be matched to the target mounting node so as to generate a target file after structure conversion.
8. The apparatus according to claim 7, wherein the apparatus further comprises a configuration file generation module, specifically configured to:
determining all message nodes in the basic file; the message nodes at least comprise message node contents and message node attributes;
establishing a mapping relation between the content of the message node and the matched object according to the attribute of the message node;
determining mounting nodes formed by matching objects and a hierarchical relationship between the mounting nodes according to the mapping relationship and the message node attribute;
and generating a configuration file according to the mounting nodes and the hierarchical relation between the mounting nodes.
9. An apparatus, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the file structure conversion method of any one of claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the file structure conversion method according to any one of claims 1 to 6.
CN202010214662.4A 2020-03-24 2020-03-24 File structure conversion method, device, equipment and storage medium Active CN111447268B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010214662.4A CN111447268B (en) 2020-03-24 2020-03-24 File structure conversion method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010214662.4A CN111447268B (en) 2020-03-24 2020-03-24 File structure conversion method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111447268A true CN111447268A (en) 2020-07-24
CN111447268B CN111447268B (en) 2022-11-25

Family

ID=71629506

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010214662.4A Active CN111447268B (en) 2020-03-24 2020-03-24 File structure conversion method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111447268B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111949614A (en) * 2020-08-12 2020-11-17 中国工商银行股份有限公司 Bank system file conversion method and device

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020059349A1 (en) * 2000-09-28 2002-05-16 Yuki Wakita Structure editing apparatus, picture structure editing apparatus, object content structure management method, object content structure display method, content management method and computer product
WO2003001812A2 (en) * 2001-06-20 2003-01-03 Thomson Licensing Sa Method and system for the conversion of xhtml/html documents to mpeg-4 documents
WO2004064357A2 (en) * 2003-01-03 2004-07-29 V-Enable, Inc. Data conversion server for voice browsing system
JP2006163820A (en) * 2004-12-07 2006-06-22 Mitsubishi Electric Corp Data converter
CN103765373A (en) * 2013-10-18 2014-04-30 华为技术有限公司 Data storage method, data storage device, and storage equipment
US20140245292A1 (en) * 2013-02-25 2014-08-28 International Business Machines Corporation Automated Application Reconfiguration
CN104573011A (en) * 2015-01-08 2015-04-29 北京数码大方科技股份有限公司 Network disk file display method and device
CN106202149A (en) * 2016-06-22 2016-12-07 南京南瑞继保电气有限公司 A kind of IEC61850 model file conversion method
CN109101500A (en) * 2017-06-20 2018-12-28 北京国双科技有限公司 A kind of methods of exhibiting and device of file data
WO2019053234A1 (en) * 2017-09-15 2019-03-21 Spherical Defence Labs Limited Detecting anomalous application messages in telecommunication networks
CN109542664A (en) * 2018-12-13 2019-03-29 平安科技(深圳)有限公司 File verification method, apparatus and computer equipment based on artificial intelligence
CN109933800A (en) * 2019-03-22 2019-06-25 中国农业银行股份有限公司 Creation method, information query method and the device of data structures system
CN110457256A (en) * 2019-08-01 2019-11-15 大众问问(北京)信息科技有限公司 Date storage method, device, computer equipment and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020059349A1 (en) * 2000-09-28 2002-05-16 Yuki Wakita Structure editing apparatus, picture structure editing apparatus, object content structure management method, object content structure display method, content management method and computer product
WO2003001812A2 (en) * 2001-06-20 2003-01-03 Thomson Licensing Sa Method and system for the conversion of xhtml/html documents to mpeg-4 documents
WO2004064357A2 (en) * 2003-01-03 2004-07-29 V-Enable, Inc. Data conversion server for voice browsing system
JP2006163820A (en) * 2004-12-07 2006-06-22 Mitsubishi Electric Corp Data converter
US20140245292A1 (en) * 2013-02-25 2014-08-28 International Business Machines Corporation Automated Application Reconfiguration
CN103765373A (en) * 2013-10-18 2014-04-30 华为技术有限公司 Data storage method, data storage device, and storage equipment
CN104573011A (en) * 2015-01-08 2015-04-29 北京数码大方科技股份有限公司 Network disk file display method and device
CN106202149A (en) * 2016-06-22 2016-12-07 南京南瑞继保电气有限公司 A kind of IEC61850 model file conversion method
CN109101500A (en) * 2017-06-20 2018-12-28 北京国双科技有限公司 A kind of methods of exhibiting and device of file data
WO2019053234A1 (en) * 2017-09-15 2019-03-21 Spherical Defence Labs Limited Detecting anomalous application messages in telecommunication networks
CN109542664A (en) * 2018-12-13 2019-03-29 平安科技(深圳)有限公司 File verification method, apparatus and computer equipment based on artificial intelligence
CN109933800A (en) * 2019-03-22 2019-06-25 中国农业银行股份有限公司 Creation method, information query method and the device of data structures system
CN110457256A (en) * 2019-08-01 2019-11-15 大众问问(北京)信息科技有限公司 Date storage method, device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
代丽等: "XML与关系型数据库数据转换技术的研究", 《重庆科技学院学报(自然科学版)》 *
王洪荣等: "异构数据库间数据交换工具的设计与实现", 《北京林业大学学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111949614A (en) * 2020-08-12 2020-11-17 中国工商银行股份有限公司 Bank system file conversion method and device
CN111949614B (en) * 2020-08-12 2024-04-02 中国工商银行股份有限公司 Bank system file conversion method and device

Also Published As

Publication number Publication date
CN111447268B (en) 2022-11-25

Similar Documents

Publication Publication Date Title
CN108519967B (en) Chart visualization method and device, terminal and storage medium
CN111488174B (en) Method and device for generating application program interface document, computer equipment and medium
CN110750654A (en) Knowledge graph acquisition method, device, equipment and medium
US20050229156A1 (en) Filter-based comments in source code
KR20080101907A (en) Edi instance based transaction set definition
CN113158101A (en) Visual page rendering method, device, equipment and storage medium
CN111026931A (en) Data query method, device, equipment and medium
CN112035443A (en) Big data execution method, system, equipment and storage medium based on Linux platform
CN111241180A (en) Information processing method, device, equipment and storage medium
CN111242462B (en) Data processing method and device, computer storage medium and electronic equipment
CN113760839A (en) Log data compression processing method and device, electronic equipment and storage medium
CN113761428A (en) Page rendering method, device and system, storage medium and electronic equipment
CN111913922B (en) Binary structured log generation method, device, equipment and storage medium
CN113094625B (en) Page element positioning method and device, electronic equipment and storage medium
CN111447268B (en) File structure conversion method, device, equipment and storage medium
CN112948396A (en) Data storage method and device, electronic equipment and storage medium
CN113760894A (en) Data calling method and device, electronic equipment and storage medium
CN111159158B (en) Data normalization method and device, computer readable storage medium and electronic equipment
CN112799760A (en) Form rendering method and device
US20230316792A1 (en) Automated generation of training data comprising document images and associated label data
US20030131071A1 (en) Electronic document interchange document object model
CN113238940B (en) Interface test result comparison method, device, equipment and storage medium
CN113590883A (en) Method, system, device and storage medium for mapping medical information and database
CN112364268A (en) Resource acquisition method and device, electronic equipment and storage medium
CN113806556A (en) Method, device, equipment and medium for constructing knowledge graph based on power grid data

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
TA01 Transfer of patent application right

Effective date of registration: 20220919

Address after: 25 Financial Street, Xicheng District, Beijing 100033

Applicant after: CHINA CONSTRUCTION BANK Corp.

Address before: 25 Financial Street, Xicheng District, Beijing 100033

Applicant before: CHINA CONSTRUCTION BANK Corp.

Applicant before: Jianxin Financial Science and Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant