JP2011113387A - Format conversion program and format conversion method - Google Patents
Format conversion program and format conversion method Download PDFInfo
- Publication number
- JP2011113387A JP2011113387A JP2009270451A JP2009270451A JP2011113387A JP 2011113387 A JP2011113387 A JP 2011113387A JP 2009270451 A JP2009270451 A JP 2009270451A JP 2009270451 A JP2009270451 A JP 2009270451A JP 2011113387 A JP2011113387 A JP 2011113387A
- Authority
- JP
- Japan
- Prior art keywords
- message
- format
- program
- file
- format conversion
- 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
Links
Images
Landscapes
- Document Processing Apparatus (AREA)
Abstract
Description
本発明は、プログラム間で送受信される電文のフォーマットを変換するフォーマット変換用プログラム及びフォーマット変換方法に関する。 The present invention relates to a format conversion program and a format conversion method for converting the format of a message transmitted and received between programs.
本発明に関連する技術として例えば特許文献1がある。特許文献1では、ネットワークで接続されたコンピュータ(情報処理装置)上で動作するプログラム(アプリケーションソフトウェア)間で電文(メッセージ、文書データ)を送受信する際、電文のフォーマットを変換する技術が開示されている。
As a technique related to the present invention, there is
このような電文のフォーマットを変換する技術例にはフォーマット変換用プログラムがあるが、フォーマット変換用プログラムでは、入力電文(フォーマット変換用プログラムに入力される電文)と出力電文(フォーマット変換用プログラムから出力される電文)のフォーマット及びその編集方法を、フォーマット変換用プログラム内に直接記述している。 An example of a technology for converting the format of such a message is a format conversion program. In the format conversion program, an input message (message input to the format conversion program) and an output message (output from the format conversion program). Format) and its editing method are directly described in the format conversion program.
しかし、上述したフォーマット変換用プログラムでは、プログラム間で送受信される電文のフォーマットが追加・変更・削除された場合、その都度プログラムソースを修正する必要があった。 However, in the above-described format conversion program, it is necessary to modify the program source each time the format of a message transmitted / received between programs is added / changed / deleted.
本発明は、上記事情に鑑みてなされたものであり、プログラムソースを修正することなく電文フォーマットの追加・変更・削除への対応が可能となるフォーマット変換用プログラム及びフォーマット変換方法を提供することを目的とする。 The present invention has been made in view of the above circumstances, and provides a format conversion program and a format conversion method that can cope with addition / change / deletion of a message format without correcting the program source. Objective.
かかる目的を達成するために、本発明のフォーマット変換用プログラムは、送信プログラムから受信プログラムへ送信される電文のフォーマットを変換するフォーマット変換用プログラムであって、送信プログラムから所定の電文を受信すると、フォーマット変換プログラムの外部のファイルから、予め記述されたフォーマット編集方法を読み込み、読み込んだフォーマット編集方法に基づいて電文のフォーマットを変換し、変換した電文を受信プログラムへ送信する処理をコンピュータに実行させることを特徴とする。 In order to achieve such an object, the format conversion program of the present invention is a format conversion program for converting the format of a message transmitted from a transmission program to a reception program, and when a predetermined message is received from the transmission program, Reading a format editing method described in advance from a file outside the format conversion program, converting the format of the message based on the read format editing method, and causing the computer to execute the process of sending the converted message to the receiving program It is characterized by.
また、本発明のフォーマット変換方法は、送信プログラムから受信プログラムへ送信される電文のフォーマットを変換するフォーマット変換方法であって、送信プログラムから所定の電文を受信すると、フォーマット変換プログラムの外部のファイルから、予め記述されたフォーマット編集方法を読み込み、読み込んだフォーマット編集方法に基づいて電文のフォーマットを変換し、変換した電文を受信プログラムへ送信することを特徴とする。 The format conversion method of the present invention is a format conversion method for converting the format of a message transmitted from a transmission program to a reception program. When a predetermined message is received from the transmission program, the format conversion method starts from a file outside the format conversion program. The format editing method described in advance is read, the format of the message is converted based on the read format editing method, and the converted message is transmitted to the receiving program.
本発明によれば、プログラムソースを修正することなく、電文フォーマットの追加・変更・削除への対応が可能となるフォーマット変換用プログラム及びフォーマット変換方法を提供することが可能となる。 According to the present invention, it is possible to provide a format conversion program and a format conversion method that can cope with addition / change / deletion of a telegram format without correcting the program source.
以下、本発明を実施するための形態(実施形態)について添付図面を参照して詳細に説明する。 DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments (embodiments) for carrying out the present invention will be described in detail with reference to the accompanying drawings.
まず、図1を参照して、本発明の一実施形態の構成について説明する。 First, the configuration of an embodiment of the present invention will be described with reference to FIG.
プログラム2は、電文を送信する送信プログラム(送信アプリ)である。
プログラム1は、プログラム2から送信された電文を受信し、DTDファイル4、入力電文フォーマットxmlファイル5、出力電文フォーマットxmlファイル6を読み込み、各ファイルの記述に従って入力電文から出力電文へのフォーマット変換を行った後、プログラム3へ送信するフォーマット変換用プログラム(変換アプリ)である。このプログラム1は、本発明のフォーマット変換用プログラムの一例である。なお、DTDはDocument Type Definitionの略であり、また、xmlはeXtensible Markup Languageの略である。
The
プログラム3は、電文を受信する受信プログラム(受信アプリ)である。
DTDファイル4は、入力電文フォーマットxmlファイル5及び出力電文フォーマットxmlファイル6の記述に使用するタグの定義が予め記述されているデータファイルである。本実施形態において、DTDファイル4は、例えば図2に示すように記述されている。
The
入力電文フォーマットxmlファイル5は、プログラム1が受信する複数の電文について、電文毎に、電文を構成する要素が予め記述されているデータファイルである。すなわち、入力電文フォーマットxmlファイル5は、DTDファイル4で定義されたタグを使用して、電文毎の要素と要素の並び順が予め記述されている。本実施形態において、入力電文フォーマットxmlファイル5は、例えば図3に示すように記述されている。
The input message
出力電文フォーマットxmlファイル6は、プログラム1が送信する複数の電文について、電文毎に、電文を構成する要素が予め記述されているデータファイルである。すなわち、出力電文フォーマットxmlファイル5は、DTDファイル4で定義されたタグを使用して、電文毎の要素と要素の並び順が予め記述されている。本実施形態において、出力電文フォーマットxmlファイル6は、例えば図4に示すように記述されている。
The output message format xml file 6 is a data file in which elements constituting a message are described in advance for each message for a plurality of messages transmitted by the
プログラム1、プログラム2、プログラム3は、例えばコンピュータ内に格納されており、コンピュータ上で動作する。また、DTDファイル4、入力電文フォーマットxmlファイル5、出力電文フォーマットxmlファイル6は、例えばコンピュータ内に格納されている。図1では、各コンピュータについての図示を省略している。なお、コンピュータ(情報処理装置)は、現在使用されている一般的な装置・機器であるので、説明は省略する。
次に、図1〜図5を参照して、本発明の一実施形態の動作について説明する。なお、DTDファイル4、入力電文フォーマットxmlファイル5、出力電文フォーマットxmlファイル6には、図2、図3、図4に示す記述がそれぞれ予めなされているとする。
Next, the operation of the embodiment of the present invention will be described with reference to FIGS. The
まず、プログラム1は、プログラム2から電文を受信する〔S1〕。
First, the
次に、プログラム1は、DTDファイル4(図2)、入力電文フォーマットxmlファイル5(図3)を読み込み、受信した電文(入力電文)を、入力電文フォーマットxmlファイル5に予め記述された構成要素に分解する〔S2〕。この動作の具体例について図3を用いて説明する。プログラム1は、図3の入力電文フォーマットxml5ファイルからnameプロパティが"SDHSUB-Ops"であるops_name要素を検索し、子要素の情報を取得する。ops_name要素の子要素には、複数のdata_number要素が存在する。それぞれのdata_number要素にはdata_name,offset,data_size,data_typeの各要素が存在する。プログラム1は、取得したoffset,data_size要素のプロパティに従って入力電文よりデータを取得し、data_number毎に子要素のプロパティをまとめて入力電文構成要素としてメモリ上に保持する。
Next, the
次に、プログラム1は、DTDファイル4(図2)、出力電文フォーマットxmlファイル6(図4)を読み込み、送信する電文(出力電文)の構成要素と構成要素の並び順を取得する〔S3〕。この動作の具体例について図4を用いて説明する。プログラム1は、図4の出力電文フォーマットxml6ファイルからnameプロパティが"SDHSUB-Ops"であるops_name要素を検索し、子要素の情報を取得する。ops_name要素の子要素には、複数のdata_number要素が存在し、出力電文の要素の並び順に並んでいる。それぞれのdata_number要素にはdata_name,data_size,data_typeの各要素が存在する。プログラム1は、data_number毎に子要素のプロパティをまとめて出力電文構成要素としてメモリ上に保持する。
Next, the
次に、プログラム1は、出力電文構成要素(取得した出力電文の構成要素)に一致する入力電文構成要素(分解した入力電文の構成要素)を検索し、出力電文構成要素の並び順に従って出力電文を作成する〔S4〕。この動作の具体例について図3、図4を用いて説明する。プログラム1は、出力電文構成要素とdata_name,data_type要素のプロパティが一致する入力電文構成要素を検索し、出力電文構成要素の並び順に従って出力電文領域にデータを転記し、出力電文を作成する。data_nameのnameプロパティが"SPACE"の場合、data_sizeプロパティのサイズの空白文字を転記する。data_nameのnameプロパティが"NULL"の場合、data_sizeプロパティのサイズのヌル文字を転記する。
Next, the
最後に、プログラム1は、作成した出力電文をプログラム3へ送信する〔S5〕。
Finally, the
以上説明したように、本実施形態によれば、プログラム1はプログラム2から電文を受信すると、読み込んだ入力電文フォーマットxmlファイル5の記述に従って、電文を構成要素(入力電文構成要素)に分解する。次に、プログラム1は、読み込んだ出力電文フォーマットxmlファイル6から、出力電文の構成要素(出力電文構成要素)とその並び順を取得する。次に、プログラム1は、出力電文構成要素に一致する入力電文構成要素を検索し、出力電文構成要素の並び順に従って出力電文を作成し、プログラム3へ送信する。すなわち、本実施形態では、フォーマット編集方法(フォーマット変換方法)をプログラム外部のxmlファイルに予め記述しているため、プログラム間で送受信する電文のフォーマットが追加・変更・削除された際、プログラムソースを修正することなく、フォーマット編集方法を記述したxmlファイルの記述の変更のみで電文フォーマットの追加・変更・削除の対応が可能となる。
As described above, according to the present embodiment, when the
以上、本発明の実施形態について説明したが、上記実施形態に限定されるものではなく、その要旨を逸脱しない範囲において種々の変形が可能である。 As mentioned above, although embodiment of this invention was described, it is not limited to the said embodiment, A various deformation | transformation is possible in the range which does not deviate from the summary.
上記実施形態では、図5に示す動作を、プログラム1〜3のソフトウェアによって実現するものとして説明したが、例えば、ハードウェアによって実現するように構成してもよい。あるいは、ハードウェアとソフトウェアの複合構成によって実現することも可能である。
In the above embodiment, the operation illustrated in FIG. 5 has been described as being realized by software of the
また、上記プログラム1〜3は、例えば、記録媒体としてのハードディスクやROM(Read Only Memory)に予め記録しておくことが可能である。あるいは、プログラム1〜3は、CD−ROM(Compact Disc Read Only Memory),MO(Magneto optical)ディスク,DVD(Digital Versatile Disc)、磁気ディスク、半導体メモリなどのリムーバブル記録媒体に、一時的、あるいは、永続的に格納(記録)しておくことが可能である。このようなリムーバブル記録媒体は、いわゆるパッケージソフトウエアとして提供することが可能である。
The
なお、上記プログラム1〜3は、上述したようなリムーバブル記録媒体からコンピュータにインストールする他、例えば、ダウンロードサイトからコンピュータに無線転送してもよい。または、LAN(Local Area Network)、インターネットといったネットワークを介して、コンピュータに有線で転送してもよい。コンピュータでは、転送されてきたプログラムを受信し、内蔵するハードディスク等の記録媒体にインストールすることが可能である。
The
また、上記プログラム1〜3の動作は、図5のフローに従って時系列的に実行されるのみならず、例えば、処理を実行する装置の処理能力、あるいは、必要に応じて並列的にあるいは個別に実行するように構築することも可能である。
Further, the operations of the
1 プログラム(フォーマット変換用プログラム)
2 プログラム(送信プログラム)
3 プログラム(受信プログラム)
4 DTDファイル
5 入力電文フォーマットxmlファイル
6 出力電文フォーマットxmlファイル
1 program (format conversion program)
2 program (transmission program)
3 Program (Receiving program)
4
Claims (6)
前記送信プログラムから所定の電文を受信すると、前記フォーマット変換プログラムの外部のファイルから、予め記述されたフォーマット編集方法を読み込み、読み込んだフォーマット編集方法に基づいて前記電文のフォーマットを変換し、変換した電文を前記受信プログラムへ送信する処理をコンピュータに実行させることを特徴とするフォーマット変換用プログラム。 A format conversion program for converting the format of a message transmitted from a transmission program to a reception program,
When a predetermined message is received from the transmission program, a format editing method described in advance is read from an external file of the format conversion program, the format of the message is converted based on the read format editing method, and the converted message A program for format conversion, which causes a computer to execute a process of transmitting a message to the reception program.
複数の電文毎に電文を構成する構成要素が予め記述されている入力電文フォーマットファイルを読み込み、読み込んだ入力電文フォーマットファイルの記述に基づいて、受信した電文を構成要素に分解する分解処理と、
複数の電文毎に電文を構成する構成要素が予め記述されている出力電文フォーマットファイルを読み込み、読み込んだ出力電文フォーマットファイルの記述から、構成要素と当該構成要素の並び順を取得する取得処理と、
分解した構成要素から、取得した構成要素に一致するものを検索し、取得した構成要素の並び順に従って電文を作成する作成処理と、
作成した電文を前記受信プログラムへ送信する送信処理と、
をコンピュータに実行させることを特徴とする請求項1記載のフォーマット変換用プログラム。 A reception process for receiving a predetermined message from the transmission program;
A disassembly process for reading an input message format file in which components constituting a message are described in advance for each of a plurality of messages, and disassembling the received message into components based on the description of the read input message format file;
An acquisition process for reading an output message format file in which a component constituting a message is described in advance for each of a plurality of messages, and acquiring an arrangement order of the component and the component from the description of the read output message format file;
From the disassembled component, search for one that matches the acquired component, and create a message according to the order of the acquired component,
A transmission process for transmitting the created message to the reception program;
The program for format conversion according to claim 1, wherein the program is executed by a computer.
前記入力電文フォーマットファイル及び前記出力電文フォーマットファイルの記述に使用されるタグの定義が予め記述されているDTDファイルも読み込まれることを特徴とする請求項2記載のフォーマット変換用プログラム。 In the decomposition process and the acquisition process,
3. The format conversion program according to claim 2, wherein a DTD file in which definitions of tags used for describing the input message format file and the output message format file are described in advance is also read.
前記送信プログラムから所定の電文を受信すると、フォーマット変換プログラムの外部のファイルから、予め記述されたフォーマット編集方法を読み込み、読み込んだフォーマット編集方法に基づいて前記電文のフォーマットを変換し、変換した電文を前記受信プログラムへ送信することを特徴とするフォーマット変換方法。 A format conversion method for converting the format of a message transmitted from a transmission program to a reception program,
When a predetermined message is received from the transmission program, the format editing method described in advance is read from a file outside the format conversion program, the format of the message is converted based on the read format editing method, and the converted message is A format conversion method comprising transmitting to the reception program.
複数の電文毎に電文を構成する構成要素が予め記述されている入力電文フォーマットファイルを読み込み、読み込んだ入力電文フォーマットファイルの記述に基づいて、受信した電文を構成要素に分解する分解ステップと、
複数の電文毎に電文を構成する構成要素が予め記述されている出力電文フォーマットファイルを読み込み、読み込んだ出力電文フォーマットファイルの記述から、構成要素と当該構成要素の並び順を取得する取得ステップと、
分解した構成要素から、取得した構成要素に一致するものを検索し、取得した構成要素の並び順に従って電文を作成する作成ステップと、
作成した電文を前記受信プログラムへ送信する送信ステップと、
を有することを特徴とする請求項4記載のフォーマット変換方法。 A receiving step of receiving a predetermined message from the transmission program;
A step of reading an input message format file in which components constituting a message for each of a plurality of messages are described in advance, and decomposing the received message into components based on the description of the read input message format file;
An acquisition step of reading an output message format file in which components constituting a message are described in advance for each of a plurality of messages, and acquiring the arrangement order of the components and the components from the description of the read output message format file;
A step of searching for a component that matches the acquired component from the disassembled component, and creating a message according to the arrangement order of the acquired component,
A transmission step of transmitting the created message to the reception program;
The format conversion method according to claim 4, further comprising:
前記入力電文フォーマットファイル及び前記出力電文フォーマットファイルの記述に使用されるタグの定義が予め記述されているDTDファイルも読み込まれることを特徴とする請求項5記載のフォーマット変換方法。 In the decomposition step and the acquisition step,
6. The format conversion method according to claim 5, wherein a DTD file in which definitions of tags used for description of the input message format file and the output message format file are described in advance is also read.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009270451A JP2011113387A (en) | 2009-11-27 | 2009-11-27 | Format conversion program and format conversion method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009270451A JP2011113387A (en) | 2009-11-27 | 2009-11-27 | Format conversion program and format conversion method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011113387A true JP2011113387A (en) | 2011-06-09 |
Family
ID=44235663
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009270451A Pending JP2011113387A (en) | 2009-11-27 | 2009-11-27 | Format conversion program and format conversion method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011113387A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113822670A (en) * | 2021-10-11 | 2021-12-21 | 中国银行股份有限公司 | Payment message conversion method and device and electronic equipment |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008090500A (en) * | 2006-09-29 | 2008-04-17 | Toshiba Corp | Data structure conversion system, program, and data structure |
-
2009
- 2009-11-27 JP JP2009270451A patent/JP2011113387A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008090500A (en) * | 2006-09-29 | 2008-04-17 | Toshiba Corp | Data structure conversion system, program, and data structure |
Non-Patent Citations (3)
Title |
---|
CSNA200901633001; Cosminexusサービスプラットフォーム 概説 概説書 第4版 第4版, 200803, pp.67-68,76-78,113-116, 株式会社日立製作所 * |
JPN6013023718; Cosminexusサービスプラットフォーム 概説 概説書 第4版 第4版, 200803, pp.67-68,76-78,113-116, 株式会社日立製作所 * |
JPN6013023721; 川俣晶: '第4回 スキーマ言語「DTD」の機能と役割' [online] [検索日2013.5.14],インターネット, 20000826, アイティメディア株式会社 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113822670A (en) * | 2021-10-11 | 2021-12-21 | 中国银行股份有限公司 | Payment message conversion method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2003256202A5 (en) | ||
JP2009140073A (en) | Term difficulty level converting device and term difficulty level converting program | |
JP2007122135A (en) | Development support device, development support method and development support program | |
JP2009527852A5 (en) | ||
Demleitner et al. | Virtual observatory publishing with DaCHS | |
JP5670859B2 (en) | Description method, EXI decoder and program | |
JP2007323368A (en) | Data difference solving program and data difference solving apparatus | |
JP2011113387A (en) | Format conversion program and format conversion method | |
JP2010250449A5 (en) | ||
JP2008152397A (en) | Information processing method and device, and information processing system | |
CN102546599A (en) | Method for implementing equivalent conversion of different protocol data | |
JP2009059311A (en) | Document conversion device and method | |
JP2007265197A (en) | Data conversion apparatus, data conversion method, and data conversion program | |
JP2008052356A (en) | Source code automatic generation device | |
JP2006079277A (en) | Structured document data conversion device and method | |
US20130110852A1 (en) | Intermediate data format for database population | |
JP2011159202A (en) | Test item generating method, device, and program | |
JP4447373B2 (en) | Data exchange computer | |
JP2009169798A (en) | Data processing system, data conversion method, and program of this method | |
JP2006099450A (en) | Information processor and information processing method, program, and recording medium | |
JP2009080681A (en) | Program structure parsing method and device | |
Binh et al. | Why the Mekong matters to ASEAN: A perspective from Vietnam | |
JP5645717B2 (en) | Program processing apparatus and program processing method | |
JP2008077617A (en) | System for managing multidimensional metadata | |
JP2005216251A (en) | Variable length multi-format converting apparatus and method and file transfer system using the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20110920 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20121018 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130521 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20131203 |