JP5564226B2 - Data conversion system and data conversion method - Google Patents
Data conversion system and data conversion method Download PDFInfo
- Publication number
- JP5564226B2 JP5564226B2 JP2009218968A JP2009218968A JP5564226B2 JP 5564226 B2 JP5564226 B2 JP 5564226B2 JP 2009218968 A JP2009218968 A JP 2009218968A JP 2009218968 A JP2009218968 A JP 2009218968A JP 5564226 B2 JP5564226 B2 JP 5564226B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- hierarchy
- check
- markup language
- fixed
- 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.)
- Active
Links
Images
Description
本発明は、異なるデータ形式のデータを相互形式に変換することができるデータ変換システム及びデータ変換方法に係り、特に変換前のデータ形式の不整合をチェックすることができるデータ変換システム及びデータ変換方法に関する。 The present invention relates to a data conversion system and a data conversion method capable of converting data of different data formats into a mutual format, and in particular, a data conversion system and a data conversion method capable of checking inconsistencies in a data format before conversion. About.
近年、商取引に関する情報を標準的な書式に統一し、企業間で電子的に交換するEDI(Electronic Data Interchange)システムが構築され、このEDIシステムは、企業間での受発注や見積もり/決済/出入荷などに関わる電子データを、あらかじめ定められた形式にしたがって電子化し、専用線やVANなどのネットワークを通じて送受信することが行われている。 In recent years, an EDI (Electronic Data Interchange) system has been established that unifies information related to commerce into a standard format and is exchanged electronically between companies. Electronic data related to the arrival of goods is digitized according to a predetermined format and transmitted / received through a network such as a dedicated line or VAN.
このEDIシステムは、データ交換の手順(通信プロトコル)や使用する業務メッセージ(発注、支払など)が企業毎に異なることが多く、更に小売企業毎にメッセージの形式が異なる場合が多いため、企業同士が直接やりとりする方式ではなく、EDIセンタという中継センタを経由してやりとりする場合が多い。このEDIシステムにおけるデータ形式としては、大別して、固定長形式と流通ビジネスメッセージ標準形式(流通BMS形式)があり、流通BMS形式の基準形式はXMLフォーマットである。尚、XML(eXxtensible Markup Language)形式データとは、文書やデータの意味や構造を記述するためのマークアップ言語により記述されたデータであり、固定長形式データとは、格納するデータ種(属性)及びデータサイズ(桁数)を予め定めた形式で記述したデータを言う。 In this EDI system, data exchange procedures (communication protocols) and business messages to be used (ordering, payment, etc.) are often different for each company, and the format of the message is often different for each retail company. In many cases, the communication is not via a direct communication method but via a relay center called an EDI center. Data formats in this EDI system are roughly classified into a fixed length format and a distribution business message standard format (distribution BMS format), and the reference format of the distribution BMS format is an XML format. Note that XML (extensible Markup Language) format data is data described in a markup language for describing the meaning and structure of documents and data, and fixed-length format data is a data type (attribute) to be stored. And data in which the data size ( number of digits ) is described in a predetermined format.
このようにEDIシステムは、異なる形式のデータの変換を行うデータ変換機能を備えるため、データ形式やデータ構造について、事前に双方の取り決めを行うことが不可欠であり、取り決めに適合するデータであるか否かをチェックするために、専用のデータチェックシステムを開発することが必要であった。 As described above, since the EDI system has a data conversion function for converting data in different formats, it is indispensable to make an agreement on both the data format and data structure in advance, and whether the data conforms to the agreement. In order to check whether or not, it was necessary to develop a dedicated data check system.
また、一般にXMLデータの内容整合性チェックを行うための標準規格としてXML Schemaと呼ばれるXML木構造等の定義を表すスキーマがあり、このスキーマを用いてXMLデータの整合性チェックを実施することができる。 In addition, there is a schema that expresses the definition of an XML tree structure called XML Schema as a standard for checking the content consistency of XML data, and the consistency check of XML data can be performed using this schema. .
尚、前記データ形式の整合性をチェックする技術が記載された文献としては下記特許文献1が挙げられる。この特許文献1には、チェック条件をデータベースに記憶させておき、チェック条件論理式を、データ名に演算子及び関数を組み合わせて作成することにより、チェック条件の変更を容易に行うことができるとする技術が記載されている。
The following
従来技術によるEDIシステムにおけるデータ形式の整合性チェック手法は、変換後データの整合性のチェックの結果、不整合が判明したとしても、変換前のデータにおける不整合箇所を特定することが困難であると言う不具合があった。また、変換後XMLデータのXMLスキーマチェック項目を変換前データにおいてチェックしようとした場合、XMLスキーマ数×データ形式数だけのデータチェックシステムを開発する必要があり、作業負荷及びコストが増大すると言う不具合もあった。また、チェック定義をパラメータ等に切り出し、共通のチェックシステムを開発することも考えられるが、チェック定義を行うための作業がスキーマ数×データ形式数だけ発生すると言う不具合もあった。 In the data format consistency check method in the EDI system according to the prior art, even if inconsistency is found as a result of checking the consistency of the data after conversion, it is difficult to specify the inconsistent portion in the data before conversion. There was a problem. In addition, when trying to check the XML schema check items of the converted XML data in the pre-conversion data, it is necessary to develop a data check system having only the number of XML schemas × the number of data formats, which increases work load and cost. There was also. In addition, it is conceivable to extract a check definition into parameters and develop a common check system. However, there is a problem that the work for performing the check definition occurs only for the number of schemas × the number of data formats.
本発明の目的は、変換元のデータ形式不整合を容易にチェックすることができるデータ変換システム及びデータ変換方法を提供することである。 An object of the present invention is to provide a data conversion system and a data conversion method that can easily check data format inconsistency of a conversion source.
前記目的を達成するために本発明は、マークアップ言語により記述されたマークアップ言語形式データとデータ種及びデータ桁数を予め固定して記述された固定長形式データとの相互変換をコンピュータにより行うデータ変換システムであって、
前記固定長形式データを構成する階層名と該階層名に対応したデータ開始位置とデータ桁数とデータ属性と該階層名の出現順序と必須項目か否かを示す必須フラグとを含む固定長データ構造情報を格納した固定長定義情報テーブル部と、
前記マークアップ言語形式データを構成する階層名と該階層名に対応したタグ名とデータ桁数と該階層名の出現順序と必須項目か否かを示す必須フラグとを含むマークアップ言語データ構造情報を格納したマークアップ言語定義情報テーブル部と、
前記マークアップ言語形式データの階層名と固定長形式データの階層名との階層名対応情報を格納した変換定義情報テーブル部と、
前記固定長定義情報テーブル部に格納した固定長データ構造情報と前記マークアップ言語定義情報テーブル部に格納したマークアップ言語データ構造情報と前記変換定義情報テーブル部に格納した階層名対応情報とを読み込み、該読み込んだ固定長データ構造情報とマークアップ言語データ構造情報と階層名対応情報とを基に、固定長形式データをマークアップ言語形式データに変換又はマークアップ言語形式データを固定長形式データに変換するための変換パラメータ情報を生成すると共に、固定長形式データ及びマークアップ言語形式データが前記固定長データ構造情報及びマークアップ言語データ構造情報と整合性が有るか否かを判定するための、前記固定長データ構造情報及びマークアップ言語データ構造情報のデータ属性とデータ桁数と階層名の出現順序と必須項目か否かを示す必須フラグとを含むデータチェックパラメータ情報を生成するパラメータ生成エンジン部と、
前記データチェックパラメータ情報を基に変換元のマークアップ言語形式データ及び固定長形式データの前記整合性を検証するためのデータチェックエンジン部を備え、
該データチェックエンジン部が、
固定長形式データをチェック対象データとして階層ごとに読み込み、前記固定長定義情報テーブル部を参照して、読み込んだチェック対象データが1階層目か否かを判定する第1工程と、
該第1工程においてチェック対象データが1階層目でないと判定したとき、前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さいかを判定する第2工程と、
該第2工程において前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さくないと判定したとき、前記データチェックパラメータ情報に含まれる階層順序及び必須フラグを参照して下層に必須の階層が存在するか否かを判定する第3工程と、
前記第2工程において前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さいと判定したとき、前記データチェックパラメータ情報に含まれる階層順序及び必須フラグを参照して前回チェック対象データの階層と現在のチェック対象データ階層間に必須階層が存在しないか否かを判定する第4工程と、
前記第1工程においてチェック対象データが1階層目であると判定したとき、又は前記第3工程おいて下層に必須の階層が存在すると判定したとき、又は前記第4工程において前回チェック対象データの階層と現在のチェック対象データの階層の間に必須階層が存在しないと判定したとき、入力データのデータ構造に整合性があると判定し、
前記第3工程及び第4工程において必須階層が存在すると判定したとき、入力データのデータ内容に整合性がないと判定するデータ構造チェック処理を実行すると共に、
マークアップ言語形式データをチェック対象データとして階層ごとに読み込み、前記マークアップ言語定義情報テーブル部を参照し、チェック対象データの項目が前記データチェックパラメータ情報に含まれるデータ属性の条件を満たすか否かを判定する第5工程と、
チェック対象データの項目が前記データチェックパラメータ情報に含まれるデータ桁数の条件を満たすか否かを判定する第6工程と、
チェック対象データの項目が前記データチェックパラメータ情報に含まれる必須フラグの条件を満たすか否かを判定する第7工程と、
前記第5工程から第7工程の何れかにおいて条件を満たさないと判定したとき、入力データのデータ内容に整合性がないと判定するデータ内容チェック処理を実行することを第1の特徴とする。
In order to achieve the above object, the present invention performs a mutual conversion between markup language format data described in a markup language and fixed-length format data described with a data type and data digits fixed in advance by a computer. A data conversion system,
Fixed-length data including a hierarchy name constituting the fixed-length format data, a data start position corresponding to the hierarchy name, the number of data digits , a data attribute, an appearance order of the hierarchy name, and a mandatory flag indicating whether it is an essential item A fixed length definition information table part storing structure information;
Markup language data structure information including a hierarchy name constituting the markup language format data, a tag name corresponding to the hierarchy name, the number of data digits , the appearance order of the hierarchy name, and a mandatory flag indicating whether or not it is a mandatory item Markup language definition information table section storing
A conversion definition information table part storing layer name correspondence information between the layer name of the markup language format data and the layer name of fixed-length format data;
Read fixed length data structure information stored in the fixed length definition information table section, markup language data structure information stored in the markup language definition information table section, and hierarchy name correspondence information stored in the conversion definition information table section Based on the read fixed-length data structure information, markup language data structure information, and hierarchy name correspondence information, the fixed-length format data is converted into markup language format data or the markup language format data is converted into fixed-length format data. Generating conversion parameter information for conversion, and determining whether the fixed-length format data and the markup language format data are consistent with the fixed-length data structure information and the markup language data structure information ; Data attributes and data of the fixed-length data structure information and markup language data structure information A parameter generating engine which generates a data check parameter information including the mandatory flag indicating whether the arranging order and required items for the number of hierarchical names,
A data check engine unit for verifying the consistency of the markup language format data to be converted and the fixed-length format data based on the data check parameter information,
The data check engine unit
A first step of reading fixed-length format data as check target data for each layer, and referring to the fixed length definition information table unit to determine whether the read check target data is the first layer;
When it is determined in the first step that the check target data is not the first hierarchy, a second determination is made as to whether the hierarchy appearance order of the previous check target data is equal to or smaller than the hierarchy appearance order of the current check target data Process,
When it is determined in the second step that the hierarchy appearance order of the previous check target data is not equal to or less than the hierarchy appearance order of the current check target data, the hierarchy order and the mandatory flag included in the data check parameter information A third step of determining whether or not a required hierarchy exists in the lower layer with reference to
When it is determined in the second step that the hierarchy appearance order of the previous check target data is equal to or smaller than the hierarchy appearance order of the current check target data, the hierarchy order and the mandatory flag included in the data check parameter information are A fourth step of referring to determine whether or not there is a required hierarchy between the hierarchy of the previous check target data and the current check target data hierarchy;
When it is determined in the first step that the check target data is the first layer, or when it is determined in the third step that an essential layer exists in the lower layer, or in the fourth step, the layer of the previous check target data When it is determined that the required hierarchy does not exist between the current check target data hierarchy, the data structure of the input data is determined to be consistent ,
When it is determined that mandatory hierarchy exists in the third step and the fourth step, and executes a data structure check process to determine that there is no consistent data contents of the input data,
Read markup language format data as check target data for each hierarchy, refer to the markup language definition information table section, and whether the check target data item satisfies the condition of the data attribute included in the data check parameter information A fifth step of determining
A sixth step of determining whether an item of data to be checked satisfies a condition for the number of data digits included in the data check parameter information ;
A seventh step of determining whether an item of data to be checked satisfies a condition of an essential flag included in the data check parameter information ;
When it is determined that the condition is not satisfied in any of the seventh step from said fifth step, to perform the data contents check processing to determine that there is no consistent data contents of the input data and the first feature.
また、本発明は、固定長形式データを構成する階層名と該階層名に対応したデータ開始位置とデータ桁数とデータ属性と該階層名の出現順序と必須項目か否かを示す必須フラグとを含む固定長データ構造情報を格納した固定長定義情報テーブル部と、
マークアップ言語形式データを構成する階層名と該階層名に対応したタグ名とデータ桁数と該階層名の出現順序と必須項目か否かを示す必須フラグとを含むマークアップ言語データ構造情報を格納したマークアップ言語定義情報テーブル部と、
前記マークアップ言語形式データの階層名と固定長形式データの階層名との階層名対応情報を格納した変換定義情報テーブル部と、
前記固定長定義情報テーブル部に格納した固定長データ構造情報と前記マークアップ言語定義情報テーブル部に格納したマークアップ言語データ構造情報と前記変換定義情報テーブル部に格納した階層名対応情報とを読み込み、該読み込んだ固定長データ構造情報とマークアップ言語データ構造情報と階層名対応情報とを基に、固定長形式データをマークアップ言語形式データに変換又はマークアップ言語形式データを固定長形式データに変換するための変換パラメータ情報を生成すると共に、固定長形式データ及びマークアップ言語形式データが前記固定長データ構造情報及びマークアップ言語データ構造情報と整合性が有るか否かを判定するための、前記固定長データ構造情報及びマークアップ言語データ構造情報のデータ属性とデータ桁数と階層名の出現順序と必須項目か否かを示す必須フラグとを含むデータチェックパラメータ情報を生成するパラメータ生成エンジン部と、
前記データチェックパラメータ情報を基に変換元のマークアップ言語形式データ及び固定長形式データの前記整合性を検証するためのデータチェックエンジン部を備え、
マークアップ言語により記述されたマークアップ言語形式データとデータ種及びデータ桁数を予め固定して記述された固定長形式データとの相互変換をコンピュータにより行うデータ変換方法であって、
該データチェックエンジン部に、
固定長形式データをチェック対象データとして階層ごとに読み込み、前記固定長定義情報テーブル部を参照して、読み込んだチェック対象データが1階層目か否かを判定する第1工程と、
該第1工程においてチェック対象データが1階層目でないと判定したとき、前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さいかを判定する第2工程と、
該第2工程において前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さくないと判定したとき、前記データチェックパラメータ情報に含まれる階層順序及び必須フラグを参照して下層に必須の階層が存在するか否かを判定する第3工程と、
前記第2工程において前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さいと判定したとき、前記データチェックパラメータ情報に含まれる階層順序及び必須フラグを参照して前回チェック対象データの階層と現在のチェック対象データ階層間に必須階層が存在しないか否かを判定する第4工程と、
前記第1工程においてチェック対象データが1階層目であると判定したとき、又は前記第3工程おいて下層に必須の階層が存在すると判定したとき、又は前記第4工程において前回チェック対象データの階層と現在のチェック対象データの階層の間に必須階層が存在しないと判定したとき、入力データのデータ構造に整合性があると判定し、
前記第3工程及び第4工程において必須階層が存在すると判定したとき、入力データのデータ内容に整合性がないと判定するデータ構造チェック処理を実行させると共に、
マークアップ言語形式データをチェック対象データとして階層ごとに読み込み、前記マークアップ言語定義情報テーブル部を参照し、チェック対象データの項目が前記データチェックパラメータ情報に含まれるデータ属性の条件を満たすか否かを判定する第5工程と、
チェック対象データの項目が前記データチェックパラメータ情報に含まれるデータ桁数の条件を満たすか否かを判定する第6工程と、
チェック対象データの項目が前記データチェックパラメータ情報に含まれる必須フラグの条件を満たすか否かを判定する第7工程と、
前記第5工程から第7工程の何れかにおいて条件を満たさないと判定したとき、入力データのデータ内容に整合性がないと判定するデータ内容チェック処理を実行させることを第2の特徴とする。
In addition, the present invention provides a hierarchy name that constitutes fixed-length format data, a data start position corresponding to the hierarchy name, the number of data digits , a data attribute, an appearance order of the hierarchy name, and an essential flag indicating whether it is an essential item, A fixed-length definition information table part storing fixed-length data structure information including
Markup language data structure information including a hierarchy name constituting markup language format data, a tag name corresponding to the hierarchy name, the number of data digits, the order of appearance of the hierarchy name, and a mandatory flag indicating whether it is a mandatory item Stored markup language definition information table part,
A conversion definition information table part storing layer name correspondence information between the layer name of the markup language format data and the layer name of fixed-length format data;
Read fixed length data structure information stored in the fixed length definition information table section, markup language data structure information stored in the markup language definition information table section, and hierarchy name correspondence information stored in the conversion definition information table section Based on the read fixed-length data structure information, markup language data structure information, and hierarchy name correspondence information, the fixed-length format data is converted into markup language format data or the markup language format data is converted into fixed-length format data. Generating conversion parameter information for conversion, and determining whether the fixed-length format data and the markup language format data are consistent with the fixed-length data structure information and the markup language data structure information ; Data attributes and data of the fixed-length data structure information and markup language data structure information A parameter generating engine which generates a data check parameter information including the mandatory flag indicating whether the arranging order and required items for the number of hierarchical names,
A data check engine unit for verifying the consistency of the markup language format data to be converted and the fixed-length format data based on the data check parameter information,
A data conversion method in which a computer performs mutual conversion between markup language format data described in a markup language and fixed-length format data described with a data type and data digits fixed in advance,
In the data check engine section,
A first step of reading fixed-length format data as check target data for each layer, and referring to the fixed length definition information table unit to determine whether the read check target data is the first layer;
When it is determined in the first step that the check target data is not the first hierarchy, a second determination is made as to whether the hierarchy appearance order of the previous check target data is equal to or smaller than the hierarchy appearance order of the current check target data Process,
When it is determined in the second step that the hierarchy appearance order of the previous check target data is not equal to or less than the hierarchy appearance order of the current check target data, the hierarchy order and the mandatory flag included in the data check parameter information A third step of determining whether or not a required hierarchy exists in the lower layer with reference to
When it is determined in the second step that the hierarchy appearance order of the previous check target data is equal to or smaller than the hierarchy appearance order of the current check target data, the hierarchy order and the mandatory flag included in the data check parameter information are A fourth step of referring to determine whether or not there is a required hierarchy between the hierarchy of the previous check target data and the current check target data hierarchy;
When it is determined in the first step that the check target data is the first layer, or when it is determined in the third step that an essential layer exists in the lower layer, or in the fourth step, the layer of the previous check target data When it is determined that the required hierarchy does not exist between the current check target data hierarchy, the data structure of the input data is determined to be consistent ,
When it is determined that mandatory hierarchy exists in the third step and fourth step, the executing data structure check process to determine that there is no consistent data contents of the input data,
Read markup language format data as check target data for each hierarchy, refer to the markup language definition information table section, and whether the check target data item satisfies the condition of the data attribute included in the data check parameter information A fifth step of determining
A sixth step of determining whether an item of data to be checked satisfies a condition for the number of data digits included in the data check parameter information ;
A seventh step of determining whether an item of data to be checked satisfies a condition of an essential flag included in the data check parameter information ;
When it is determined that from the fifth step does not satisfy the condition in any of the seventh step, the second, characterized in that to execute the data contents check processing to determine that there is no consistent data contents of the input data.
本発明によるデータ変換システム及び方法は、前記データチェックエンジンが、チェック対象データが1階層目か否かと、前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さくなく且つ下層に必須の階層が存在しないか否かと、前回チェック対象データの階層と現在のチェック対象データ階層間に必須階層が存在するか否かの判定によりデータ構造チェック処理と、チェック対象データの項目が属性条件か桁数条件か項目必須条件を満たすか否かによりデータ内容チェック処理とを実行することによって、変換前のデータ形式不整合を容易にチェックすることができる。 In the data conversion system and method according to the present invention, the data check engine compares whether the check target data is in the first layer and compares the hierarchy appearance order of the previous check target data with the hierarchy appearance order of the current check target data. Data structure check processing and check by determining whether there is no required hierarchy in the lower and lower layers, and whether the required hierarchy exists between the previous check target data hierarchy and the current check target data hierarchy. By executing the data content check process depending on whether the target data item satisfies the attribute condition, the digit number condition, or the item mandatory condition, it is possible to easily check the data format inconsistency before conversion.
以下、本発明によるデータ変換方法を実現するデータ変換システムを図面を参照して説明するが、まず、本発明の前提となるデータの不整合について説明する。例えば、電子商取引における固定長データ形式は、例えば図4(a)に示す如く、最初に転送ヘッダS、該転送ヘッダSの1段下層にファイルヘッダA及びBがあり、これらファイルヘッダA及びBの1段下層に伝票ヘッダBがあり、該伝票ヘッダBの1段下層に伝票明細Dが位置する様に定義されている。本実施形態で述べるデータの不整合とは、例えば図4(b)に示す如く、2段目のファイルヘッダA(2)の1段下に存在すべき伝票ヘッダB(3)がなく、伝票明細D(5)が位置してしまうような、図4(a)に示した定義に合致しないデータ形式のことを言う。 Hereinafter, a data conversion system for realizing a data conversion method according to the present invention will be described with reference to the drawings. First, data inconsistency which is a premise of the present invention will be described. For example, as shown in FIG. 4A, for example, a fixed-length data format in electronic commerce has a transfer header S first, and file headers A and B at one level below the transfer header S. These file headers A and B Is defined so that a slip header B is located in a lower layer of the slip header B, and a slip detail D is located in a lower layer of the slip header B. The inconsistency of data described in the present embodiment means that, for example, as shown in FIG. 4B, there is no slip header B (3) that should be present one step below the second row file header A (2), and slip This is a data format that does not match the definition shown in FIG.
[全体構成]
さて、本実施形態によるデータ変換システムは、例えば電子商取引におけるEDIシステムに含まれるものであって、図1に示す如く、変換前後のデータ形式の定義情報を基に変換パラメータ201及びデータチェックパラメータ302を生成するデータ変換定義設定システム100と、該データ変換定義設定システム100が生成した変換パラメータ201を用いて入力データ(例えば固定長形式データ)202を出力データ(XML形式データ)204に変換するデータ変換システム200と、前記データチェックパラメータ302及び入力データ202を入力して入力データ202の整合性をチェックするデータチェックシステム300とから構成されている。尚、本明細書では、ハードウェア的な図示及び説明を行うが、前述の各システムはコンピュータのメモリに格納されるデータやプログラムによって構成されるものである。
[overall structure]
The data conversion system according to the present embodiment is included in, for example, an EDI system in electronic commerce. As shown in FIG. 1, the conversion parameter 201 and the data check
[データ変換定義設定システム100]
前記データ変換定義設定システム100は、電子商取引のデータを予め固定長のデータ形式として定義した固定長定義情報を格納する固定長定義情報テーブル部101と、電子商取引のデータを予めXMLのデータ形式として定義したXML定義情報を格納するXML定義情報テーブル部103と、前記固定長定義情報とXML定義情報間相互の変換情報を格納する変換定義情報テーブル部102と、前記固定長定義情報テーブル部101に格納した固定長定義情報とXML定義情報テーブル部103に格納したXML定義情報と前記変換定義情報テーブル部102に格納した変換情報とを基に、後述する変換パラメータ201及びデータチェックパラメータ302を生成するパラメータ生成エンジン部104とから構成される。
[Data conversion definition setting system 100]
The data conversion definition setting system 100 includes a fixed-length definition
[固定長定義情報テーブル部101]
前記固定長定義情報テーブル部101に格納した固定長定義情報の構造は、例えば図5(a)に示す如く、階層名として、「転送ヘッダ」「ファイルヘッダ」「伝票ヘッダ」「伝票明細」の4階層名であること、各々の識別文字が「S」「A」「B」「D」と定義されていること、各レコード長が256ビットであることがデータ構造として定義されている。この固定長定義情報テーブル部101には、項目名に応じた固定長データの開始位置/長さ/属性の固定長データの項目情報が定義されており、これは例えば図6(a)に示す如く、項目名「レコード区分」の開始位置が「1」、長さ(桁数)が「1」、属性が「X」の如く定義されており、他の項目名に対する項目情報も図示の通りである。
[Fixed length definition information table section 101]
The structure of the fixed length definition information stored in the fixed length definition
[変換定義情報テーブル部102]
前記変換定義情報テーブル部102に格納した変換情報の構造は、図5(b)に示す如く、変換元(固定長形式)と変換後(XML形式)の定義名の対応は、変換元「階層名」が変換後「階層名」、変換元「転送ヘッダ」が変換後「SBDH」、変換元「ファイルヘッダ」が「ヘッダ」、変換元「伝票ヘッダ」が変換後「取引」、変換元「伝票明細」が変換後「明細」に各々対応しているとして定義されている。この変換定義情報テーブル部102には、変換元の固定長形式の項目名に対応する変換後のXML形式の項目名及び変換情報が登録されており、これは、例えば図6(b)に示す如く、変換元項目名「伝票番号」に対応する変換後の項目名が「明細番号」であり、変換情報が「前ゼロ埋め(桁数に対して桁数上位の空き桁にゼロを挿入する)」形式であるの如く定義されており、他の項目名に対する情報も図示の通りである。
[Conversion definition information table section 102]
As shown in FIG. 5B, the conversion information stored in the conversion definition
[XML定義情報テーブル部103]
前記XML定義情報テーブル部103に格納したXML定義情報の構造は、図5(b)に示す如く、階層名に対する「タグ名」「出現順序」「必須か任意か」の各項目が定義されており、例えば階層名「SBDH」(Standard Business Document Header)のタグ名が「shStandardBussinessDocumentHeader」、出現順序が「1」、「必須フラグ」として格納されている。
このXML定義情報テーブル部103には、項目名に対するタグ名(XPath)/属性/桁数/必須か任意かの区分情報のXML項目情報が定義されており、これは例えば図6(c)に示す如く、項目名「明細番号」のタグ名(XPath)が「data/list/item/lineNumber」、属性が「英数」、桁数が「最大4」、区分情報が「必須」の如く定義されており、他の項目名に対する項目情報も図示の通りである。この前記XML定義情報テーブル部103には、項目名に対するタグ名(XPath)/属性/桁数/必須か任意かの区分情報のXML項目情報が定義されており、これは例えば図6(c)に示す如く、項目名「明細番号」のタグ名(XPath)が「data/list/item/lineNumber」、属性が「英数」、桁数が「最大4」、区分情報が「必須」の如く定義されており、他の項目名に対する項目情報も図示の通りである。尚、図6(c)では省略しているが、階層名の出現順位を図5(c)と同様に数値として格納しても良い。
[XML definition information table section 103]
In the structure of the XML definition information stored in the XML definition
In this XML definition
尚、前記図6(b)の「伝票レス区分」は伝票を要しない区分コードを示し、例えば図7(b)に示す如く、コード「01」が「伝票レス」(紙伝票が存在しない)、コード「02」が「伝票あり」(紙伝票が存在すること)を意味するものであって、変換前後の変換テーブルは、例えば図7(a)に示す如く、入力と出力の関係として定義づけられている。 The “slipless category” in FIG. 6B indicates a category code that does not require a slip. For example, as shown in FIG. 7B, the code “01” is “slipless” (no paper slip exists). , Code “02” means “slip is present” (paper slip is present), and the conversion table before and after conversion is defined as the relationship between input and output as shown in FIG. 7A, for example. It is attached.
[動作]
次に、前述の様に構成した本実施形態によるデータ変換システム(EDIシステム)が固定長形式データをXML形式データに変換する動作を動作フロー図を参照して説明する。
[入力データの整合性チェック動作]
まず、本実施形態によるデータ変換システムによる入力データの整合性チェック動作を説明する。この整合性チェック動作は、図2に示す如く、データチェックシステム300のデータチェックエンジン部301が、データチェックパラメータ302からデータチェックパラメータを読み込むステップS501と、チェック対象の入力データの1階層データを読み込むステップS502と、該読み込んだ1階層データの構造チェックを行い、不整合(NG)と判定したときにエラーログを出力するステップS508に移行するステップS503と、該ステップS503において構造チェック結果が整合性あり(OK)と判定されたときに前記1階層データを読み込むステップS504と、該読み込んだ1階層データの項目チェックを行い、不整合(NG)と判定したときに前記ステップS508に移行するステップS505と、該ステップS505により整合性あり(OK)と判定されたときにコードリストのチェックを行い、不整合(NG)と判定したときに前記ステップS508に移行するステップS506と、チェック対象のデータが末尾(最下層)か否かを判定し、末尾でないと判定したときに前記ステップS502に戻り、末尾と判定したときに処理を終了するステップS507とを実行する。
[Operation]
Next, an operation in which the data conversion system (EDI system) according to the present embodiment configured as described above converts fixed-length format data into XML format data will be described with reference to an operation flowchart.
[Consistency check of input data]
First, the consistency check operation of input data by the data conversion system according to the present embodiment will be described. In this consistency check operation, as shown in FIG. 2, the data check
本実施形態によるデータチェックシステム300は、前述の各ステップを実行することによって、多層構造から成る入力データを1階層毎に読み込んで各層の構造と項目とコードリストの各チェックを実行することによって、入力データの不整合を判定することができる。
The data check
[データチェックパラメータ及び変換パラメータ生成動作]
次いで本実施形態によるデータ変換システムは、データチェックシステム300が、前述の変換エンジン部203が変換パラメータを参照してデータ変換(例えば、固定長形式データをXML形式データに変換)するものであって、この変換動作を図3を参照して説明する。
この変換動作処理は、図3に示す如く、データ変換定義設定システム100のパラメータ生成エンジン103が、固定長定義情報テーブル部101から固定長定義情報を読み込むと共にXML定義情報テーブル部103からXML定義情報を読み込むステップS101と、これら読み込んだ定義情報を基にデータチェックパラメータ302を出力するステップS102と、データチェックエンジン部301が、固定長形式の入力データ202及び前述のデータチェックパラメータ302を基に入力データのデータチェックを行うステップS103と、該ステップS103によるチェック結果が正常(不整合がない入力データ)であるか否かを判定するステップS105と、該ステップS105により異常ありと判定したとき、チェック結果データ303を参照し、入力データの異常(不整合)箇所を修正して前記ステップS102に戻るステップS104と、前記ステップS105において異常(不整合)なしと判定したとき、前記変換パラメータ201を変換エンジン部203に出力するステップS106と、変換エンジン部203が、前記入力した変換パラメータ201を用いて入力データ202を変換し、出力データ204として出力するステップS107とを実行することによって、入力データの整合性のチェックを行った後にデータ変換を行う様に動作することができる。
[Data check parameter and conversion parameter generation]
Next, in the data conversion system according to the present embodiment, the
As shown in FIG. 3, in this conversion operation process, the
[データチェックパラメータ302出力処理]
前記ステップS102によるデータチェックパラメータを出力する処理は、図8に示す如く、パラメータ生成エンジン部104が、固定長定義情報テーブル部101から固定長定義情報を読み込むと共にXML定義情報テーブル部103からXML定義情報を読み込むステップS201と、該読み込んだ固定長定義情報及びXML定義情報を入力データチェックワークテーブル(図示しないメモリ上の一時記憶領域)に、図5に示した各情報を出現順序/必須又は任意等の階層情報として格納して反映させるステップS202と、前記入力データチェックワークテーブルに、図6に示した項目定義情報を属性/桁数/必須又は任意等の項目情報に格納して反映させるステップS203と、入力データチェックワークテーブルに格納した各データ内容をデータチェックパラメータ302として出力するステップS204とを実行することによって、データチェックパラメータ302として出力することができる。
[
As shown in FIG. 8, the parameter
前記ステップS201により入力データチェックワークテーブルに格納される情報は、階層名に対応した識別文字/レコード長/出現順序/必須又は任意の区分情報であり、例えば、図10(a)に示す如く、階層名「転送ヘッダ」に対して識別文字が「S」、レコード長が「##」、出現順序が「1」、区分が「必須」の如く格納され、前記ステップS202により入力データチェックワークテーブルに格納される情報は、項目名に対応した各要素情報を格納したものであり、例えば、図10(a)に示す如く、項目名「商品コードの群版」の開始位置が「6」、長さ(桁数)が「12」、入力属性が「9」、出力属性が「英数」、桁数が「最大10」、必須区分が「任意」の如く格納され、他の項目名に対する要素情報も図示の通りである。 The information stored in the input data check work table in the step S201 is identification character / record length / appearance order / essential or arbitrary division information corresponding to the hierarchy name. For example, as shown in FIG. The identification name is “S”, the record length is “##”, the appearance order is “1”, and the classification is “required” for the hierarchy name “transfer header”, and the input data check work table is stored in step S202. Is stored in the element information corresponding to the item name. For example, as shown in FIG. 10A, the start position of the item name “product code group edition” is “6”, The length (number of digits) is stored as “12”, the input attribute is “9”, the output attribute is “alphanumeric”, the number of digits is “maximum 10”, and the required category is “arbitrary”. Element information is also shown .
[変換パラメータ201生成処理]
前記ステップS102による変換パラメータ201の生成(出力)処理は、図9に示す如く、パラメータ生成エンジン部104が、固定長定義情報テーブル部101から固定長定義情報を読み込むと共にXML定義情報テーブル部103からXML定義情報を読み込むステップS301と、該読み込んだ固定長定義情報及びXML定義情報を後述の如く紐付けた階層情報として変換定義ワークテーブル(図示しないメモリ上の一時記憶領域)に格納して反映させるステップS302と、前記変換定義ワークテーブルに、各定義情報を紐付けた要素情報を追加するステップS303と、該変換定義ワークテーブルに格納した各種情報をデータチェックパラメータ302として出力するステップS304とを実行する。
[Conversion parameter 201 generation processing]
In the generation (output) process of the conversion parameter 201 in step S102, the parameter
前記ステップS302により変換定義ワークテーブルに格納する階層情報は、階層名に対応した識別文字/レコード長/タグ名(XPath)から成る各階層情報であって、図11(a)に示す如く、例えば、階層名「転送ヘッダ」の識別文字が「S」、レコード長が「##」(任意の値)、タグ名(XPath)が「shStandardBussinessDocumentHeader」の如く格納され、他の項目名に対する階層情報も図示の通りである。 The hierarchy information stored in the conversion definition work table in the step S302 is each hierarchy information consisting of identification characters / record length / tag name (XPath) corresponding to the hierarchy name. As shown in FIG. , The identification character of the hierarchy name “transfer header” is stored as “S”, the record length is “##” (arbitrary value), the tag name (XPath) is stored as “shStandardBusinessDocumentHeader”, and the hierarchy information for other item names As shown.
前記ステップS303により変換定義ワークテーブルに格納する要素情報は、項目名に対応した開始位置/長さ(桁数)/タグ名(XPath)/変換情報から成る要素情報であって、図11(b)に示す如く、例えば、階層名「伝票行番号」の開始位置が「4」、長さ(桁数)が「3」、タグ名(XPath)が「data/list/item/lineNuber」、変換情報が「前ゼロつめ」の如く格納され、他の項目名に対する要素情報も図示の通りである。 The element information stored in the conversion definition work table in step S303 is element information consisting of start position / length (number of digits) / tag name (XPath) / conversion information corresponding to the item name, as shown in FIG. ), For example, the start position of the hierarchical name “slip line number” is “4”, the length (number of digits) is “3”, the tag name (XPath) is “data / list / item / lineNumber”, conversion Information is stored as “front zero”, and element information for other item names is also shown in the figure.
[ステップS105による構造チェック処理]
前述の図3変換処理においてステップS105によりデータチェックエンジン部301が実行する入力データ202の構造チェック処理手順の詳細を次に図12を参照して説明する。
このチェック処理手順は、データチェックエンジン部301が、図12に示す如く、取得した1階層情報が階層チェックが初回か否かを判定するステップS401と、該ステップS401において初回でないと判定したとき、前回のチェック対象階層情報の階層出現順序(番号)と現在のチェック対象の階層出現順序(番号)とを比較するステップS402を実行する。前記階層出現順位とは、図4に示したデータの各階層の予め定められた出現する順位(順番)であって、前述のステップS402においては、今回の階層出現順位(例えば2階層目)が、前回の階層出現順位(例えば1階層目)と等しいか小さいか(≧)を判定することによって、今回階層出現順位が前回階層出現順位と同位又は下位か否かを判定する。
[Structure check processing in step S105]
Details of the structure check processing procedure of the
In this check processing procedure, when the data check
次いで本処理手順は、前記ステップS402において、今回の階層出現順位(例えば2階層目)が前回の階層出現順位(例えば1階層目)と等しいか小さい(≧)と判定したとき、即ち、今回の階層順位が前回階層順位以下と判定したとき、前回チェック対象階層データの前階層と今回チェック対象階層との間に、必須階層が存在しないか否かを判定し、必須階層が存在しないと判定したとき、不整合(NG)な入力データであると判定するステップS406に移行するステップS403と、前記ステップS402において、今回の階層出現順位(例えば2階層目)が前回の階層出現順位(例えば1階層目)と等しいか小くないと判定したとき、即ち、今回の階層順位が前回階層順位以上(同順位は除く)と判定したとき、下層に必須の階層が存在するか否かを判定し、存在すると判定したときには、整合(OK)データであると判定するステップS405に移行し、存在しないと判定したとき、不整合(NG)な入力データであると判定するステップS406に移行するステップS404とを実行する。 Next, in this processing procedure, when it is determined in step S402 that the current hierarchy appearance rank (for example, the second hierarchy) is equal to or smaller (≧) than the previous hierarchy appearance rank (for example, the first hierarchy), that is, When the hierarchy rank is determined to be lower than the previous hierarchy rank, it is determined whether there is no required hierarchy between the previous hierarchy of the previous check target hierarchy data and the current check hierarchy, and it is determined that the required hierarchy does not exist In step S403, the process proceeds to step S406 where it is determined that the input data is inconsistent (NG). In step S402, the current hierarchy appearance rank (eg, the second hierarchy) is the previous hierarchy appearance order (eg, one hierarchy). Necessary hierarchy in the lower layer when it is determined that it is not equal to or smaller than the first), that is, when the current hierarchy rank is determined to be equal to or higher than the previous hierarchy rank (excluding the same rank) When it is determined that the data is present, the process proceeds to step S405 where it is determined that the data is consistent (OK). When it is determined that the data is not present, the input data is determined to be inconsistent (NG). Step S404 which moves to step S406 is executed.
このように本実施形態によるチェック処理手順は、データチェックエンジン部301が、今回階層出現順位と前回階層出現順位を比較し、今回階層出現順位が前回階層出現順位と比較して下位か否かを判定(ステップS402)する第1工程と、該第1工程による判定により上位と判定(ステップS402においてN)したとき、今回チェック階層の下層に必須の階層が存在か否かを判定する第2工程(ステップS404)と、前記第1工程により前記今回階層出現順位が前回階層出現順位と比較して下位か否かの判定において下位でないと判定したとき、前回階層と今回階層との間に必須の階層が存在するか否かを判定する第3工程(ステップS403)とを実行し、
前記第2工程において今回チェック階層の下層に必須の階層が構造定義情報では存在しないと判定(ステップS404においてN)したとき、又は第3工程において前回階層と今回階層との間に必須の階層が構造定義情報では存在すると判定したとき(ステップS403においてY)、入力データが整合性があることをチェックし、前記第2工程において今回チェック階層の下層に必須の階層が構造定義情報では存在すると判定(ステップS404においてY)したとき、又は第3工程において前回階層と今回階層との間に必須の階層が構造定義情報では存在しないと判定したとき(ステップS403においてN)、入力データが不整合性があることをチェックすることができる。
As described above, in the check processing procedure according to the present embodiment, the data check
When it is determined in the second step that an essential layer does not exist in the structure definition information below the current check layer (N in step S404), or an essential layer exists between the previous layer and the current layer in the third step. When it is determined that the structure definition information exists (Y in step S403), it is checked that the input data is consistent, and in the second step, it is determined that an essential hierarchy exists in the structure definition information below the current check hierarchy. (Yes in step S404), or when it is determined in the third step that there is no required hierarchy in the structure definition information between the previous hierarchy and the current hierarchy (N in step S403), the input data is inconsistent You can check that there is.
[ステップS105による項目チェック処理]
前述の図3チェック処理においてステップS105によりデータチェックエンジン部301が実行する入力データ202のチェック処理手順の詳細を次に図13を参照して説明する。
[Item Check Processing in Step S105]
Details of the check process procedure of the
この項目チェック処理手順は、データチェックエンジン部301が、図13に示す如く、入力データの項目が属性情報を満たすか否かを判定するステップS501と、項目が桁数条件を満たすか否かを判定するステップS502と、入力データの項目が必須条件を満たすか否かを判定するステップS503とを実行し、前記ステップS501における何れかの条件を満たさないと判定したときに入力データが不整合とチェックし、前記各ステップS501〜S503の全条件を満たすと判定したときに入力データが整合あるとチェックすることができる。
In this item check processing procedure, as shown in FIG. 13, the data check
[フィールドリストチェック]
前記図2のコードリストチェックを行うステップS506の処理動作を次に図14を参照して説明する。このコードリストチェック処理は、図14に示す如く、まずステップS504にて取得した1項目情報がコード変換テーブル(図7[a]の変換定義情報)の該当項目入力値の何れかに一致するか否かを判定し、該当項目入力値の何れかに一致したときに整合性ありのステップS702に移行し、該当項目入力値の何れかに一致しない際には整合性なしとするステップS703に移行するステップS701を実行することによって、コードリストチェックを行うことができる。
[Field list check]
The processing operation in step S506 for performing the code list check in FIG. 2 will be described with reference to FIG. In this code list check process, as shown in FIG. 14, first, whether one item information acquired in step S504 matches any of the corresponding item input values in the code conversion table (conversion definition information in FIG. 7A). The process proceeds to step S702 with consistency when it matches any of the corresponding item input values, and shifts to step S703 when it does not match any of the corresponding item input values. The code list check can be performed by executing step S701.
このように本発明によるデータ変換システム及び方法は、 Thus, the data conversion system and method according to the present invention includes:
固定長形式データを構成する階層名と該階層名に対応したデータ開始位置とデータ桁数とデータ属性と該階層名の出現順序と必須項目か否かを示す必須フラグとを含む固定長データ構造情報を格納した固定長定義情報テーブル部101と、 Fixed-length data structure including a hierarchy name constituting fixed-length format data, a data start position corresponding to the hierarchy name, the number of data digits, a data attribute, an appearance order of the hierarchy name, and a mandatory flag indicating whether it is a mandatory item Fixed-length definition
前記マークアップ言語形式データを構成する階層名と該階層名に対応したタグ名とデータ桁数と該階層名の出現順序と必須項目か否かを示す必須フラグとを含むマークアップ言語データ構造情報を格納したXML(マークアップ言語)定義情報テーブル部103と、 Markup language data structure information including a hierarchy name constituting the markup language format data, a tag name corresponding to the hierarchy name, the number of data digits, the appearance order of the hierarchy name, and a mandatory flag indicating whether or not it is a mandatory item XML (markup language) definition
前記マークアップ言語形式データの階層名と固定長形式データの階層名との階層名対応情報を格納した変換定義情報テーブル部102と、 A conversion definition
前記固定長定義情報テーブル部101に格納した固定長データ構造情報と前記XML(マークアップ言語)定義情報テーブル部103に格納したマークアップ言語データ構造情報と前記変換定義情報テーブル部102に格納した階層名対応情報とを読み込み、該読み込んだ固定長データ構造情報とマークアップ言語データ構造情報と階層名対応情報とを基に、固定長形式データをマークアップ言語形式データに変換又はマークアップ言語形式データを固定長形式データに変換するための変換パラメータ情報を生成すると共に、固定長形式データ及びマークアップ言語形式データが前記固定長データ構造情報及びマークアップ言語データ構造情報と整合性が有るか否かを判定するための、前記固定長データ構造情報及びマークアップ言語データ構造情報のデータ属性とデータ桁数と階層名の出現順序と必須項目か否かを示す必須フラグとを含むデータチェックパラメータ情報を生成するパラメータ生成エンジン部104と、 Fixed length data structure information stored in the fixed length definition
前記データチェックパラメータ情報を基に変換元のマークアップ言語形式データ及び固定長形式データの前記整合性を検証するためのデータチェックエンジン部301を備え、 A data
該データチェックエンジン部301が、 The data check
固定長形式データをチェック対象データとして階層ごとに読み込み、前記固定長定義情報テーブル部を参照して、読み込んだチェック対象データが1階層目か否かを判定するステップS401と、 Step S401 for reading fixed-length format data as check target data for each layer and determining whether the read check target data is the first layer with reference to the fixed-length definition information table section;
該ステップS401においてチェック対象データが1階層目でないと判定したとき、前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さいかを判定するステップS402と、 When it is determined in step S401 that the check target data is not the first hierarchy, it is determined whether the hierarchy appearance order of the previous check target data is equal to or smaller than the hierarchy appearance order of the current check target data; ,
該ステップS402において前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さくないと判定したとき、前記データチェックパラメータ情報に含まれる階層順序及び必須フラグを参照して下層に必須の階層が存在するか否かを判定するステップS404と、 When it is determined in step S402 that the hierarchy appearance order of the previous check target data is not equal to or less than the hierarchy appearance order of the current check target data, the hierarchy order and the mandatory flag included in the data check parameter information are set. Step S404 for determining whether or not a required hierarchy exists in the lower layer with reference to,
前記ステップS402において前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さいと判定したとき、前記データチェックパラメータ情報に含まれる階層順序及び必須フラグを参照して前回チェック対象データの階層と現在のチェック対象データ階層間に必須階層が存在しないか否かを判定するステップS403と、 When it is determined in step S402 that the hierarchy appearance order of the previous check target data is equal to or smaller than the hierarchy appearance order of the current check target data, refer to the hierarchy order and the mandatory flag included in the data check parameter information Step S403 for determining whether or not there is a required hierarchy between the previous check target data hierarchy and the current check target data hierarchy;
前記ステップS401においてチェック対象データが1階層目であると判定したとき、又は前記ステップS403おいて下層に必須の階層が存在すると判定したとき、又は前記ステップS403において前回チェック対象データの階層と現在のチェック対象データの階層の間に必須階層が存在しないと判定したとき、入力データのデータ構造に整合性があると判定し、 When it is determined in step S401 that the check target data is the first layer, or when it is determined in step S403 that an indispensable layer exists, or in step S403, the previous check target data layer and the current layer When it is determined that the required hierarchy does not exist between the check target data hierarchy, it is determined that the data structure of the input data is consistent,
前記ステップS404及びステップS403において必須階層が存在すると判定したとき、入力データのデータ内容に整合性がないと判定するデータ構造チェック処理を実行すると共に、 When it is determined in step S404 and step S403 that an essential hierarchy exists, a data structure check process for determining that the data content of the input data is inconsistent is executed,
マークアップ言語形式データをチェック対象データとして階層ごとに読み込み、前記XML(マークアップ言語)定義情報テーブル部103を参照し、チェック対象データの項目が前記データチェックパラメータ情報に含まれるデータ属性の条件を満たすか否かを判定するステップS501と、 Markup language format data is read for each layer as check target data, and the XML (markup language) definition
チェック対象データの項目が前記データチェックパラメータ情報に含まれるデータ桁数の条件を満たすか否かを判定するステップS502と、 Step S502 for determining whether or not the item of data to be checked satisfies the condition for the number of data digits included in the data check parameter information;
チェック対象データの項目が前記データチェックパラメータ情報に含まれる必須フラグの条件を満たすか否かを判定するステップS503と、 Step S503 for determining whether or not the item of data to be checked satisfies the condition of the mandatory flag included in the data check parameter information;
前記ステップS501からステップS503の何れかにおいて条件を満たさないと判定したとき、入力データのデータ内容に整合性がないと判定するデータ内容チェック処理を実行することによって、変換前のデータ形式不整合を容易にチェックすることができる。 When it is determined that the condition is not satisfied in any of Steps S501 to S503, a data content check process before the conversion is performed by executing a data content check process that determines that the data content of the input data is not consistent. It can be easily checked.
100:データ変換定義設定システム、101:固定長定義情報テーブル部、102:変換定義情報テーブル部、103:XML定義情報テーブル部、104:パラメータ生成エンジン部、200:データ変換システム、201:変換パラメータ、202:入力データ、203:変換エンジン部、300:データチェックシステム、301:データチェックエンジン部、302:データチェックパラメータテーブル部、303:チェック結果データ。 100: Data conversion definition setting system, 101: Fixed length definition information table section, 102: Conversion definition information table section, 103: XML definition information table section, 104: Parameter generation engine section, 200: Data conversion system, 201: Conversion parameter 202: input data, 203: conversion engine unit, 300: data check system, 301: data check engine unit, 302: data check parameter table unit, 303: check result data.
Claims (2)
前記固定長形式データを構成する階層名と該階層名に対応したデータ開始位置とデータ桁数とデータ属性と該階層名の出現順序と必須項目か否かを示す必須フラグとを含む固定長データ構造情報を格納した固定長定義情報テーブル部と、
前記マークアップ言語形式データを構成する階層名と該階層名に対応したタグ名とデータ桁数と該階層名の出現順序と必須項目か否かを示す必須フラグとを含むマークアップ言語データ構造情報を格納したマークアップ言語定義情報テーブル部と、
前記マークアップ言語形式データの階層名と固定長形式データの階層名との階層名対応情報を格納した変換定義情報テーブル部と、
前記固定長定義情報テーブル部に格納した固定長データ構造情報と前記マークアップ言語定義情報テーブル部に格納したマークアップ言語データ構造情報と前記変換定義情報テーブル部に格納した階層名対応情報とを読み込み、該読み込んだ固定長データ構造情報とマークアップ言語データ構造情報と階層名対応情報とを基に、固定長形式データをマークアップ言語形式データに変換又はマークアップ言語形式データを固定長形式データに変換するための変換パラメータ情報を生成すると共に、固定長形式データ及びマークアップ言語形式データが前記固定長データ構造情報及びマークアップ言語データ構造情報と整合性が有るか否かを判定するための、前記固定長データ構造情報及びマークアップ言語データ構造情報のデータ属性とデータ桁数と階層名の出現順序と必須項目か否かを示す必須フラグとを含むデータチェックパラメータ情報を生成するパラメータ生成エンジン部と、
前記データチェックパラメータ情報を基に変換元のマークアップ言語形式データ及び固定長形式データの前記整合性を検証するためのデータチェックエンジン部を備え、
該データチェックエンジン部が、
固定長形式データをチェック対象データとして階層ごとに読み込み、前記固定長定義情報テーブル部を参照して、読み込んだチェック対象データが1階層目か否かを判定する第1工程と、
該第1工程においてチェック対象データが1階層目でないと判定したとき、前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さいかを判定する第2工程と、
該第2工程において前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さくないと判定したとき、前記データチェックパラメータ情報に含まれる階層順序及び必須フラグを参照して下層に必須の階層が存在するか否かを判定する第3工程と、
前記第2工程において前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さいと判定したとき、前記データチェックパラメータ情報に含まれる階層順序及び必須フラグを参照して前回チェック対象データの階層と現在のチェック対象データ階層間に必須階層が存在しないか否かを判定する第4工程と、
前記第1工程においてチェック対象データが1階層目であると判定したとき、又は前記第3工程おいて下層に必須の階層が存在すると判定したとき、又は前記第4工程において前回チェック対象データの階層と現在のチェック対象データの階層の間に必須階層が存在しないと判定したとき、入力データのデータ構造に整合性があると判定し、
前記第3工程及び第4工程において必須階層が存在すると判定したとき、入力データのデータ内容に整合性がないと判定するデータ構造チェック処理を実行すると共に、
マークアップ言語形式データをチェック対象データとして階層ごとに読み込み、前記マークアップ言語定義情報テーブル部を参照し、チェック対象データの項目が前記データチェックパラメータ情報に含まれるデータ属性の条件を満たすか否かを判定する第5工程と、
チェック対象データの項目が前記データチェックパラメータ情報に含まれるデータ桁数の条件を満たすか否かを判定する第6工程と、
チェック対象データの項目が前記データチェックパラメータ情報に含まれる必須フラグの条件を満たすか否かを判定する第7工程と、
前記第5工程から第7工程の何れかにおいて条件を満たさないと判定したとき、入力データのデータ内容に整合性がないと判定するデータ内容チェック処理を実行することを特徴とするデータ変換システム。 A data conversion system in which a computer performs mutual conversion between markup language format data described in a markup language and fixed-length format data described with a data type and data digit number fixed in advance,
Fixed-length data including a hierarchy name constituting the fixed-length format data, a data start position corresponding to the hierarchy name, the number of data digits , a data attribute, an appearance order of the hierarchy name, and a mandatory flag indicating whether it is an essential item A fixed length definition information table part storing structure information;
Markup language data structure information including a hierarchy name constituting the markup language format data, a tag name corresponding to the hierarchy name, the number of data digits , the appearance order of the hierarchy name, and a mandatory flag indicating whether or not it is a mandatory item Markup language definition information table section storing
A conversion definition information table part storing layer name correspondence information between the layer name of the markup language format data and the layer name of fixed-length format data;
Read fixed length data structure information stored in the fixed length definition information table section, markup language data structure information stored in the markup language definition information table section, and hierarchy name correspondence information stored in the conversion definition information table section Based on the read fixed-length data structure information, markup language data structure information, and hierarchy name correspondence information, the fixed-length format data is converted into markup language format data or the markup language format data is converted into fixed-length format data. Generating conversion parameter information for conversion, and determining whether the fixed-length format data and the markup language format data are consistent with the fixed-length data structure information and the markup language data structure information ; Data attributes and data of the fixed-length data structure information and markup language data structure information A parameter generating engine which generates a data check parameter information including the mandatory flag indicating whether the arranging order and required items for the number of hierarchical names,
A data check engine unit for verifying the consistency of the markup language format data to be converted and the fixed-length format data based on the data check parameter information,
The data check engine unit
A first step of reading fixed-length format data as check target data for each layer, and referring to the fixed length definition information table unit to determine whether the read check target data is the first layer;
When it is determined in the first step that the check target data is not the first hierarchy, a second determination is made as to whether the hierarchy appearance order of the previous check target data is equal to or smaller than the hierarchy appearance order of the current check target data Process,
When it is determined in the second step that the hierarchy appearance order of the previous check target data is not equal to or less than the hierarchy appearance order of the current check target data, the hierarchy order and the mandatory flag included in the data check parameter information A third step of determining whether or not a required hierarchy exists in the lower layer with reference to
When it is determined in the second step that the hierarchy appearance order of the previous check target data is equal to or smaller than the hierarchy appearance order of the current check target data, the hierarchy order and the mandatory flag included in the data check parameter information are A fourth step of referring to determine whether or not there is a required hierarchy between the hierarchy of the previous check target data and the current check target data hierarchy;
When it is determined in the first step that the check target data is the first layer, or when it is determined in the third step that an essential layer exists in the lower layer, or in the fourth step, the layer of the previous check target data When it is determined that the required hierarchy does not exist between the current check target data hierarchy, the data structure of the input data is determined to be consistent ,
When it is determined that the required hierarchy exists in the third step and the fourth step, a data structure check process for determining that the data content of the input data is inconsistent is performed,
Read markup language format data as check target data for each hierarchy, refer to the markup language definition information table section, and whether the check target data item satisfies the condition of the data attribute included in the data check parameter information A fifth step of determining
A sixth step of determining whether an item of data to be checked satisfies a condition for the number of data digits included in the data check parameter information ;
A seventh step of determining whether an item of data to be checked satisfies a condition of an essential flag included in the data check parameter information ;
The fifth step from the time it is determined that the condition is not satisfied in any of the seventh step, the data conversion system and executes the data contents check processing to determine that there is no consistent data contents of the input data.
マークアップ言語形式データを構成する階層名と該階層名に対応したタグ名とデータ桁数と該階層名の出現順序と必須項目か否かを示す必須フラグとを含むマークアップ言語データ構造情報を格納したマークアップ言語定義情報テーブル部と、
前記マークアップ言語形式データの階層名と固定長形式データの階層名との階層名対応情報を格納した変換定義情報テーブル部と、
前記固定長定義情報テーブル部に格納した固定長データ構造情報と前記マークアップ言語定義情報テーブル部に格納したマークアップ言語データ構造情報と前記変換定義情報テーブル部に格納した階層名対応情報とを読み込み、該読み込んだ固定長データ構造情報とマークアップ言語データ構造情報と階層名対応情報とを基に、固定長形式データをマークアップ言語形式データに変換又はマークアップ言語形式データを固定長形式データに変換するための変換パラメータ情報を生成すると共に、固定長形式データ及びマークアップ言語形式データが前記固定長データ構造情報及びマークアップ言語データ構造情報と整合性が有るか否かを判定するための、前記固定長データ構造情報及びマークアップ言語データ構造情報のデータ属性とデータ桁数と階層名の出現順序と必須項目か否かを示す必須フラグとを含むデータチェックパラメータ情報を生成するパラメータ生成エンジン部と、
前記データチェックパラメータ情報を基に変換元のマークアップ言語形式データ及び固定長形式データの前記整合性を検証するためのデータチェックエンジン部を備え、
マークアップ言語により記述されたマークアップ言語形式データとデータ種及びデータ桁数を予め固定して記述された固定長形式データとの相互変換をコンピュータにより行うデータ変換方法であって、
該データチェックエンジン部に、
固定長形式データをチェック対象データとして階層ごとに読み込み、前記固定長定義情報テーブル部を参照して、読み込んだチェック対象データが1階層目か否かを判定する第1工程と、
該第1工程においてチェック対象データが1階層目でないと判定したとき、前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さいかを判定する第2工程と、
該第2工程において前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さくないと判定したとき、前記データチェックパラメータ情報に含まれる階層順序及び必須フラグを参照して下層に必須の階層が存在するか否かを判定する第3工程と、
前記第2工程において前回のチェック対象データの階層出現順序が現在のチェック対象データの階層出現順序と比較して等しいか小さいと判定したとき、前記データチェックパラメータ情報に含まれる階層順序及び必須フラグを参照して前回チェック対象データの階層と現在のチェック対象データ階層間に必須階層が存在しないか否かを判定する第4工程と、
前記第1工程においてチェック対象データが1階層目であると判定したとき、又は前記第3工程おいて下層に必須の階層が存在すると判定したとき、又は前記第4工程において前回チェック対象データの階層と現在のチェック対象データの階層の間に必須階層が存在しないと判定したとき、入力データのデータ構造に整合性があると判定し、
前記第3工程及び第4工程において必須階層が存在すると判定したとき、入力データのデータ内容に整合性がないと判定するデータ構造チェック処理を実行させると共に、
マークアップ言語形式データをチェック対象データとして階層ごとに読み込み、前記マークアップ言語定義情報テーブル部を参照し、チェック対象データの項目が前記データチェックパラメータ情報に含まれるデータ属性の条件を満たすか否かを判定する第5工程と、
チェック対象データの項目が前記データチェックパラメータ情報に含まれるデータ桁数の条件を満たすか否かを判定する第6工程と、
チェック対象データの項目が前記データチェックパラメータ情報に含まれる必須フラグの条件を満たすか否かを判定する第7工程と、
前記第5工程から第7工程の何れかにおいて条件を満たさないと判定したとき、入力データのデータ内容に整合性がないと判定し、
データ内容チェック処理を実行させることを特徴とするデータ変換方法。 Fixed-length data structure including a hierarchy name constituting fixed-length format data, a data start position corresponding to the hierarchy name, the number of data digits , a data attribute, an appearance order of the hierarchy name, and a mandatory flag indicating whether it is a mandatory item Fixed-length definition information table section storing information;
Markup language data structure information including a hierarchy name constituting markup language format data, a tag name corresponding to the hierarchy name, the number of data digits, the order of appearance of the hierarchy name, and a mandatory flag indicating whether it is a mandatory item Stored markup language definition information table part,
A conversion definition information table part storing layer name correspondence information between the layer name of the markup language format data and the layer name of fixed-length format data;
Read fixed length data structure information stored in the fixed length definition information table section, markup language data structure information stored in the markup language definition information table section, and hierarchy name correspondence information stored in the conversion definition information table section Based on the read fixed-length data structure information, markup language data structure information, and hierarchy name correspondence information, the fixed-length format data is converted into markup language format data or the markup language format data is converted into fixed-length format data. Generating conversion parameter information for conversion, and determining whether the fixed-length format data and the markup language format data are consistent with the fixed-length data structure information and the markup language data structure information ; Data attributes and data of the fixed-length data structure information and markup language data structure information A parameter generating engine which generates a data check parameter information including the mandatory flag indicating whether the arranging order and required items for the number of hierarchical names,
A data check engine unit for verifying the consistency of the markup language format data to be converted and the fixed-length format data based on the data check parameter information,
A data conversion method in which a computer performs mutual conversion between markup language format data described in a markup language and fixed-length format data described with a data type and data digits fixed in advance,
In the data check engine section,
A first step of reading fixed-length format data as check target data for each layer, and referring to the fixed length definition information table unit to determine whether the read check target data is the first layer;
When it is determined in the first step that the check target data is not the first hierarchy, a second determination is made as to whether the hierarchy appearance order of the previous check target data is equal to or smaller than the hierarchy appearance order of the current check target data Process,
When it is determined in the second step that the hierarchy appearance order of the previous check target data is not equal to or less than the hierarchy appearance order of the current check target data, the hierarchy order and the mandatory flag included in the data check parameter information A third step of determining whether or not a required hierarchy exists in the lower layer with reference to
When it is determined in the second step that the hierarchy appearance order of the previous check target data is equal to or smaller than the hierarchy appearance order of the current check target data, the hierarchy order and the mandatory flag included in the data check parameter information are A fourth step of referring to determine whether or not there is a required hierarchy between the hierarchy of the previous check target data and the current check target data hierarchy;
When it is determined in the first step that the check target data is the first layer, or when it is determined in the third step that an essential layer exists in the lower layer, or in the fourth step, the layer of the previous check target data When it is determined that the required hierarchy does not exist between the current check target data hierarchy, the data structure of the input data is determined to be consistent ,
When it is determined that mandatory hierarchy exists in the third step and fourth step, the executing data structure check process to determine that there is no consistent data contents of the input data,
Read markup language format data as check target data for each hierarchy, refer to the markup language definition information table section, and whether the check target data item satisfies the condition of the data attribute included in the data check parameter information A fifth step of determining
A sixth step of determining whether an item of data to be checked satisfies a condition for the number of data digits included in the data check parameter information ;
A seventh step of determining whether an item of data to be checked satisfies a condition of an essential flag included in the data check parameter information ;
When it is determined that the condition is not satisfied in any of the fifth to seventh steps, it is determined that the data content of the input data is not consistent,
A data conversion method characterized by causing a data content check process to be executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009218968A JP5564226B2 (en) | 2009-09-24 | 2009-09-24 | Data conversion system and data conversion method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009218968A JP5564226B2 (en) | 2009-09-24 | 2009-09-24 | Data conversion system and data conversion method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011070285A JP2011070285A (en) | 2011-04-07 |
JP5564226B2 true JP5564226B2 (en) | 2014-07-30 |
Family
ID=44015537
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009218968A Active JP5564226B2 (en) | 2009-09-24 | 2009-09-24 | Data conversion system and data conversion method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5564226B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6078570B2 (en) * | 2015-02-23 | 2017-02-08 | 日本電信電話株式会社 | Method, apparatus, and recording medium on which program for confirming consistency of transmitted health data is recorded |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4452211B2 (en) * | 2005-05-16 | 2010-04-21 | 日本電信電話株式会社 | Data mismatch detection device and detection method |
JP5324797B2 (en) * | 2007-02-26 | 2013-10-23 | Soop株式会社 | Data management system |
-
2009
- 2009-09-24 JP JP2009218968A patent/JP5564226B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2011070285A (en) | 2011-04-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10261959B2 (en) | Systems and methods for type coercion | |
US7599944B2 (en) | Electronic data interchange (EDI) schema simplification interface | |
JP5324797B2 (en) | Data management system | |
JP4373721B2 (en) | Method and system for encoding markup language documents | |
US7447707B2 (en) | Automatic schema discovery for electronic data interchange (EDI) at runtime | |
CN101390088B (en) | Xml payload specification for modeling EDI schemas | |
US20170255595A1 (en) | Systems, methods and articles to automatically transform documents transmitted between senders and recipients | |
US8612489B2 (en) | LossLess transformation of XBRL instance to XML data model instance | |
US20190139637A1 (en) | Synchronization of hierarchical data | |
WO2009074974A1 (en) | System and process for producing a two-layer document, and a two-layer document produced accordingly | |
WO2003067470A1 (en) | Document delivery apparatus, document reception apparatus, document delivery method, document delivery program, and document delivery system | |
JP5420317B2 (en) | Conversion parameter generation system and conversion program | |
JP5564226B2 (en) | Data conversion system and data conversion method | |
US10956659B1 (en) | System for generating templates from webpages | |
WO2016060553A1 (en) | A method for converting file format and system thereof | |
US10742772B2 (en) | Method for transforming data for low volume transmission of meta model based protocol which monitors power amount data of new renewable energy, and system for transmitting data for low volume transmission of meta model based protocol which monitors power amount data of new renewable energy | |
US20210176068A1 (en) | Apparatus, computer program and method | |
US20090100087A1 (en) | Method and system for xform generation and processing application integration framework | |
WO2016060548A1 (en) | Electronic document and electronic file | |
WO2022230180A1 (en) | Information processing device, information processing method, and program | |
KR102265304B1 (en) | Device and Method for Modeling Ontology | |
US9436440B1 (en) | System, method, and computer program for validating web service interface design | |
JP6330257B2 (en) | Design document data creation support program, design document data creation support method, and information processing apparatus | |
Currall et al. | " No Going Back?" The final report of the Effective Records Management Project | |
KR102592320B1 (en) | Web server that performs test report validation based on blockchain network and Validation system for the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120924 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20120924 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20120924 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131029 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20131227 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20140128 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140421 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20140428 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20140527 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140616 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5564226 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |