JP2020009073A - Conversion device and conversion program - Google Patents
Conversion device and conversion program Download PDFInfo
- Publication number
- JP2020009073A JP2020009073A JP2018128557A JP2018128557A JP2020009073A JP 2020009073 A JP2020009073 A JP 2020009073A JP 2018128557 A JP2018128557 A JP 2018128557A JP 2018128557 A JP2018128557 A JP 2018128557A JP 2020009073 A JP2020009073 A JP 2020009073A
- Authority
- JP
- Japan
- Prior art keywords
- api
- data
- application
- platform
- name
- 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
- Stored Programmes (AREA)
Abstract
Description
本発明は、変換装置および変換プログラムに関するものである。 The present invention relates to a conversion device and a conversion program.
特許文献1には、共通APIと独自APIとの間で、類似度が高いデータまたはグループを1対1でマッピングさせ、そのマッピングに基づいて、API変換テーブルを作成する技術が記載されている。「API」は、Application Programming Interfaceの略語である。 Patent Literature 1 describes a technique in which data or groups having a high degree of similarity are mapped on a one-to-one basis between a common API and a unique API, and an API conversion table is created based on the mapping. “API” is an abbreviation for Application Programming Interface.
機器の状態の見える化または遠隔からの制御を行うために、クラウド上のプラットフォームに様々な機器が接続され、そのプラットフォーム上に様々なアプリケーションが構築されているとする。また、プラットフォーム側では、アプリケーション側に対して機器の制御またはデータ参照用の汎用的なAPIを提供しており、アプリケーション側では、そのAPIから本質的に必要な部分を選択し、必要に応じてデータ名称の読み替えまたはデータ構造の変換を設計しているとする。このような場合、プラットフォーム側のAPIのライフサイクルはプラットフォーム依存であり、アプリケーション側のAPIのライフサイクルとは関係なく変更またはバージョンアップが発生する。その結果、アプリケーション側のAPIのデータ名称およびデータ構造とプラットフォーム側のAPIのデータ名称およびデータ構造との間に違いが生じることになる。この違いへ対応するため、また、プラットフォーム側のAPIのライフサイクルに対応するため、アプリケーション側では、違いを吸収する変換ロジックを開発し、プラットフォーム側のAPIが更新される度に、変換ロジックを改変する対応方法をとることが考えられる。しかし、この対応方法では、アプリケーションごとに変換ロジックを開発することになり、プラットフォーム側のAPIの更新時の開発コストも大きくなるため、変換ロジックの開発効率化が課題になる。 It is assumed that various devices are connected to a platform on the cloud and various applications are built on the platform in order to visualize the state of the device or remotely control the device. On the platform side, a general-purpose API for controlling the device or referring to data is provided to the application side, and the application side selects essentially necessary parts from the API, and as necessary, Suppose that you are designing the replacement of data names or the conversion of data structures. In such a case, the life cycle of the API on the platform side is platform-dependent, and changes or version upgrades occur regardless of the life cycle of the API on the application side. As a result, a difference occurs between the data name and data structure of the API on the application side and the data name and data structure of the API on the platform side. To cope with this difference and to cope with the life cycle of the API on the platform side, on the application side, develop a conversion logic to absorb the difference, and modify the conversion logic every time the API on the platform side is updated It is conceivable to take a corresponding method. However, in this method, the conversion logic is developed for each application, and the development cost when updating the API on the platform side increases. Therefore, the efficiency of the conversion logic development becomes a problem.
特許文献1に記載の技術では、共通APIと独自APIとの間で、類似度が高いデータまたはグループを1対1でマッピングさせているため、類似度の計算精度によっては両API間の違いを正しく吸収することができない。 In the technique described in Patent Document 1, since data or groups having high similarity are mapped one-to-one between the common API and the unique API, the difference between the two APIs may be determined depending on the calculation accuracy of the similarity. It cannot be absorbed properly.
そこで、上記課題に対し、機器データの単純さに着目する。一般的に機器データは構造が単純であり、データ名称の変換またはデータ構造の変換は設定レベルに落とすことが可能である。そのため、設定レベルで上記変換ロジックと同等の仕組みを実現できれば開発が効率化できると考えられる。 In view of the above, attention is paid to the simplicity of device data. Generally, device data has a simple structure, and the conversion of data names or the conversion of data structures can be reduced to a setting level. Therefore, if a mechanism equivalent to the above-described conversion logic can be realized at the setting level, development can be considered to be efficient.
本発明は、アプリケーション側がプラットフォーム側のAPIの更新に効率的かつ確実に対応できるようにすることを目的とする。 An object of the present invention is to enable an application to efficiently and surely respond to an update of an API on a platform.
本発明の一態様に係る変換装置は、
サービスを利用するためのアプリケーションプログラミングインタフェースであるアプリケーション側APIで扱われるデータに含まれるデータ項目の名前および識別子を示すアプリケーション側スキーマを、前記サービスを提供するためのアプリケーションプログラミングインタフェースであるプラットフォーム側APIで扱われるデータに含まれるデータ項目の名前および識別子を示すプラットフォーム側スキーマと照合して、前記アプリケーション側スキーマに示されているデータ項目の名前と、前記プラットフォーム側スキーマに示されている、対応するデータ項目の名前との紐付けを定義するAPI変換定義を生成するAPI管理部と、
前記API管理部により生成されたAPI変換定義に従って、前記アプリケーション側APIで扱われるデータに含まれるデータ項目の名前と、前記プラットフォーム側APIで扱われるデータに含まれるデータ項目の名前との間の変換を行うAPI変換部と
を備える。
A conversion device according to one embodiment of the present invention includes:
An application-side schema indicating the names and identifiers of data items included in data handled by an application-side API that is an application programming interface for using a service is converted by a platform-side API that is an application programming interface for providing the service. The name of the data item indicated in the application-side schema and the corresponding data indicated in the platform-side schema are checked against the platform-side schema indicating the name and identifier of the data item included in the handled data. An API management unit that generates an API conversion definition that defines an association with an item name;
Conversion between a name of a data item included in data handled by the application-side API and a name of a data item included in data handled by the platform-side API according to an API conversion definition generated by the API management unit And an API conversion unit that performs
本発明では、アプリケーション側とプラットフォーム側とでデータ項目の識別子を共通化することにより、設定レベルで前述した変換ロジックと同等の仕組みを実現できる。そのため、本発明によれば、アプリケーション側がプラットフォーム側のAPIの更新に効率的かつ確実に対応できるようになる。 According to the present invention, by sharing the identifier of the data item between the application side and the platform side, a mechanism equivalent to the above-described conversion logic at the setting level can be realized. Therefore, according to the present invention, the application side can efficiently and reliably respond to the update of the API on the platform side.
以下、本発明の実施の形態について、図を用いて説明する。各図中、同一または相当する部分には、同一符号を付している。実施の形態の説明において、同一または相当する部分については、説明を適宜省略または簡略化する。なお、本発明は、以下に説明する実施の形態に限定されるものではなく、必要に応じて種々の変更が可能である。例えば、以下に説明する実施の形態のうち、2つ以上の実施の形態が組み合わせられて実施されても構わない。あるいは、以下に説明する実施の形態のうち、1つの実施の形態または2つ以上の実施の形態の組み合わせが部分的に実施されても構わない。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the respective drawings, the same or corresponding parts are denoted by the same reference characters. In the description of the embodiments, the description of the same or corresponding portions will be omitted or simplified as appropriate. Note that the present invention is not limited to the embodiments described below, and various modifications can be made as necessary. For example, two or more of the embodiments described below may be implemented in combination. Alternatively, of the embodiments described below, one embodiment or a combination of two or more embodiments may be partially implemented.
実施の形態1.
本実施の形態について、図1から図10を用いて説明する。
Embodiment 1 FIG.
This embodiment will be described with reference to FIGS.
***構成の説明***
図1を参照して、本実施の形態に係る変換装置10の構成を説明する。
*** Configuration description ***
With reference to FIG. 1, the configuration of a
変換装置10は、複数のアプリケーション40とプラットフォーム50との間に設置される。変換装置10は、アプリケーション側API41とプラットフォーム側API51との間のデータ名称およびデータ構造の変換を行うコンピュータである。なお、変換の対象となるアプリケーション側API41は、本実施の形態では2つ以上あるが、1つ以上あればよい。変換対象となるプラットフォーム側API51は、本実施の形態では2つ以上あるが、1つ以上あればよい。
The
それぞれのアプリケーション40は、図示していない機器からのデータ収集と機器の制御との少なくともいずれかのサービスを利用するプログラムである。それぞれのアプリケーション側API41は、1つ以上のアプリケーション40の開発に用いられる。すなわち、それぞれのアプリケーション側API41は、上記サービスを利用するためのアプリケーションプログラミングインタフェースである。
Each
プラットフォーム50は、上記サービスを提供するプログラムまたはそのプログラムが動作するシステムである。それぞれのプラットフォーム側API51は、プラットフォーム50の開発に用いられる。すなわち、それぞれのプラットフォーム側API51は、上記サービスを提供するためのアプリケーションプログラミングインタフェースである。
The
機器は、インターネット等のネットワークを介してプラットフォーム50と接続される。本実施の形態では、家電、スマートメータおよびゲートウェイ装置といった各種機器によってフィールド環境が構築され、複数のアプリケーション40およびプラットフォーム50によってクラウド環境が構築される。
The device is connected to the
なお、変換装置10は、プラットフォーム50に統合されてもよい。
Note that the
変換装置10は、プロセッサ11を備えるとともに、メモリ12および通信デバイス13といった他のハードウェアを備える。プロセッサ11は、信号線を介して他のハードウェアと接続され、これら他のハードウェアを制御する。
The
変換装置10は、機能要素として、API変換部21と、API管理部22とを備える。API変換部21は、データ変換機能23、データ名称変換機能24およびデータ構造変換機能25等の機能を持つ。API管理部22は、変換定義生成機能26、データ項目管理機能27および公開API削除機能28等の機能を持つ。API変換部21およびAPI管理部22の機能は、ソフトウェアにより実現される。具体的には、API変換部21およびAPI管理部22の機能は、変換プログラムにより実現される。変換プログラムは、API変換部21およびAPI管理部22により行われる処理をそれぞれAPI変換処理およびAPI管理処理としてコンピュータに実行させるプログラムである。変換プログラムは、コンピュータ読取可能な媒体に記録されて提供されてもよいし、記録媒体に格納されて提供されてもよいし、プログラムプロダクトとして提供されてもよい。
The
プロセッサ11は、変換プログラムを実行する装置である。プロセッサ11は、例えば、CPUである。「CPU」は、Central Processing Unitの略語である。 The processor 11 is a device that executes a conversion program. The processor 11 is, for example, a CPU. “CPU” is an abbreviation for Central Processing Unit.
メモリ12は、変換プログラムをあらかじめまたは一時的に記憶する装置である。メモリ12は、例えば、RAM、フラッシュメモリまたはこれらの組み合わせである。「RAM」は、Random Access Memoryの略語である。
The
通信デバイス13は、変換プログラムに入力されるデータを受信するレシーバ14と、変換プログラムから出力されるデータを送信するトランスミッタ15とを備える。通信デバイス13は、例えば、通信チップまたはNICである。「NIC」は、Network Interface Cardの略語である。
The
変換プログラムは、メモリ12からプロセッサ11に読み込まれ、プロセッサ11によって実行される。メモリ12には、変換プログラムだけでなく、OSも記憶されている。「OS」は、Operating Systemの略語である。プロセッサ11は、OSを実行しながら、変換プログラムを実行する。なお、変換プログラムの一部または全部がOSに組み込まれていてもよい。
The conversion program is read from the
変換プログラムおよびOSは、補助記憶装置に記憶されていてもよい。補助記憶装置は、例えば、HDD、フラッシュメモリまたはこれらの組み合わせである。「HDD」は、Hard Disk Driveの略語である。変換プログラムおよびOSは、補助記憶装置に記憶されている場合、メモリ12にロードされ、プロセッサ11によって実行される。
The conversion program and the OS may be stored in the auxiliary storage device. The auxiliary storage device is, for example, an HDD, a flash memory, or a combination thereof. “HDD” is an abbreviation for Hard Disk Drive. When the conversion program and the OS are stored in the auxiliary storage device, the conversion program and the OS are loaded into the
変換装置10は、プロセッサ11を代替する複数のプロセッサを備えていてもよい。これら複数のプロセッサは、変換プログラムの実行を分担する。それぞれのプロセッサは、例えば、CPUである。
The
変換プログラムにより利用、処理または出力されるデータ、情報、信号値および変数値は、メモリ12、補助記憶装置、または、プロセッサ11内のレジスタまたはキャッシュメモリに記憶される。
Data, information, signal values, and variable values used, processed, or output by the conversion program are stored in the
変換装置10は、1台のコンピュータで構成されていてもよいし、複数台のコンピュータで構成されていてもよい。変換装置10が複数台のコンピュータで構成されている場合は、API変換部21およびAPI管理部22の機能が、各コンピュータに分散されて実現されてもよい。
The
本実施の形態では、データ項目一覧31、アプリケーション側スキーマ32、プラットフォーム側スキーマ33、API変換定義34および有効条件35がメモリ12に記憶される。
In the present embodiment, the
データ項目一覧31の例を図2に示す。データ項目一覧31は、複数のアプリケーション側API41と複数のプラットフォーム側API51との間で共通する、データ項目ごとの識別子、型および種別を示すデータである。
FIG. 2 shows an example of the
アプリケーション側スキーマ32の例を図3および図4に示す。アプリケーション側スキーマ32は、各アプリケーション側API41で扱われるデータに含まれるデータ項目の名前および識別子を示す情報である。具体的には、アプリケーション側スキーマ32は、各アプリケーション側API41のエンドポイント、リクエストレスポンスで扱われるデータに含まれるデータ項目の名前および識別子を示す情報である。「エンドポイント」はアプリケーション側API41の所在を示す識別名であり、APIの公開方法により、関数名、URI等がある。「URI」は、Uniform Resource Identifierの略語である。本実施の形態では、アプリケーション側スキーマ32は、各アプリケーション側API41で扱われるデータに含まれるデータ項目の型をさらに示す情報である。また、アプリケーション側スキーマ32は、各アプリケーション側API41で扱われるデータの構造をさらに示す情報である。
FIGS. 3 and 4 show examples of the application-
プラットフォーム側スキーマ33の例を図5および図6に示す。プラットフォーム側スキーマ33は、各プラットフォーム側API51で扱われるデータに含まれるデータ項目の名前および識別子を示す情報である。具体的には、プラットフォーム側スキーマ33は、各プラットフォーム側API51のエンドポイント、リクエストレスポンスで扱われるデータに含まれるデータ項目の名前および識別子を示す情報である。本実施の形態では、プラットフォーム側スキーマ33は、各プラットフォーム側API51で扱われるデータに含まれるデータ項目の型をさらに示す情報である。また、プラットフォーム側スキーマ33は、各プラットフォーム側API51で扱われるデータの構造をさらに示す情報である。
5 and 6 show examples of the platform-
API変換定義34の例を図7および図8に示す。API変換定義34は、各アプリケーション側API41についてアプリケーション側スキーマ32に示されているデータ項目の名前と、対応するプラットフォーム側API51についてプラットフォーム側スキーマ33に示されている、対応するデータ項目の名前との紐付けを定義する情報である。この紐付けは、後述するように、アプリケーション側スキーマ32に示されている識別子と、プラットフォーム側スキーマ33に示されている識別子とを突き合わせた結果に応じて行われる。本実施の形態では、API変換定義34は、各アプリケーション側API41についてアプリケーション側スキーマ32に示されているデータの構造と、対応するプラットフォーム側API51についてプラットフォーム側スキーマ33に示されているデータの構造との少なくともいずれか一方から他方への変換のしかたをさらに定義する情報である。
7 and 8 show examples of the
有効条件35の例を図9に示す。有効条件35は、公開されているアプリケーション側API41を削除するための条件を定義するデータである。
FIG. 9 shows an example of the
***動作の説明***
図10を参照して、本実施の形態に係る変換装置10の動作を説明する。変換装置10の動作は、本実施の形態に係る変換方法に相当する。
*** Explanation of operation ***
With reference to FIG. 10, the operation of
ステップS101において、API管理部22は、アプリケーション側スキーマ32をプラットフォーム側スキーマ33と照合してAPI変換定義34を生成する。
In step S101, the
具体的には、API管理部22は、アプリケーション側API41ごとに、アプリケーション側スキーマ32に示されているデータ項目の識別子をキーとしてプラットフォーム側スキーマ33を検索することで、対応するプラットフォーム側API51を抽出する。そして、API管理部22は、アプリケーション側API41ごとに、アプリケーション側スキーマ32に示されているデータ項目の名前と、抽出したプラットフォーム側API51についてプラットフォーム側スキーマ33に示されている、対応するデータ項目の名前との紐付けを定義する情報をAPI変換定義34として生成する。
Specifically, for each application-
本実施の形態では、API管理部22は、アプリケーション側API41ごとに、対応するプラットフォーム側API51を抽出する際に、アプリケーション側スキーマ32に示されているデータ項目の識別子および型の組み合わせをキーとしてプラットフォーム側スキーマ33を検索する。
In the present embodiment, when extracting the corresponding platform-
本実施の形態では、API管理部22は、アプリケーション側スキーマ32に2つ以上のデータ項目の識別子が示されているアプリケーション側API41については、プラットフォーム側スキーマ33に当該2つ以上のデータ項目の識別子と同じ識別子を含む複数のデータ項目の識別子が示されているプラットフォーム側API51を、対応するプラットフォーム側API51として抽出する。そして、API管理部22は、アプリケーション側スキーマ32に示されている2つ以上のデータ項目の名前と、抽出したプラットフォーム側API51についてプラットフォーム側スキーマ33に示されている同数のデータ項目の名前との紐付けを定義する情報をAPI変換定義34に含める。
In the present embodiment, for the application-
なお、API管理部22は、アプリケーション側スキーマ32およびプラットフォーム側スキーマ33のほかに、ロール定義および有効期限といった他の情報も利用して、API変換定義34を生成してもよい。
Note that the
ステップS102において、API管理部22は、各アプリケーション側API41を公開する。これにより、任意のアプリケーション側API41を用いたアプリケーション40の開発または改修が可能となる。
In step S102, the
公開されたアプリケーション側API41を用いて開発または改修されたアプリケーション40が実行されると、ステップS103の処理が行われる。
When the
ステップS103において、API変換部21は、API管理部22により生成されたAPI変換定義34に従って、各アプリケーション側API41で扱われるデータに含まれるデータ項目の名前と、対応するプラットフォーム側API51で扱われるデータに含まれるデータ項目の名前との間の変換を行う。
In step S103, the
本実施の形態では、API変換部21は、API変換定義34に従って、各アプリケーション側API41で扱われるデータの構造と、対応するプラットフォーム側API51で扱われるデータの構造との間の変換をさらに行う。
In the present embodiment, the
このように、API変換定義34に従って、公開されたアプリケーション側API41への入力がプラットフォーム側API51への入力に変換される。出力の変換についても同様である。
In this manner, the input to the published application-
図2から図8の例を用いて、変換装置10の動作の具体例を説明する。
A specific example of the operation of the
ステップS101において、API管理部22は、アプリケーション側API41「app_a_api1」について、アプリケーション側スキーマ32から、リクエストデータの第1データ項目の識別子「device_name」および型「string」と、リクエストデータの第2データ項目の識別子「power_limit」および型「int」と、レスポンスデータのデータ項目の識別子「return_code」および型「int」とを取得する。API管理部22は、取得したリクエストデータの第1データ項目の識別子「device_name」および型「string」と、リクエストデータの第2データ項目の識別子「power_limit」および型「int」と、レスポンスデータのデータ項目の識別子「return_code」および型「int」とをキーとして、プラットフォーム側スキーマ33を検索する。プラットフォーム側API51「default_api1」について、プラットフォーム側スキーマ33に、リクエストデータの第1データ項目の識別子「device_name」および型「string」と、リクエストデータの第2データ項目の識別子「power_limit」および型「int」と、レスポンスデータの第1データ項目の識別子「return_code」および型「int」とが示されている。そのため、API管理部22は、アプリケーション側API41「app_a_api1」に対応するプラットフォーム側API51として、プラットフォーム側API51「default_api1」を抽出する。プラットフォーム側API51「default_api1」について、プラットフォーム側スキーマ33には、レスポンスデータの第2データ項目の識別子「return_message」および型「string」も示されているが、完全一致は要求されない。すなわち、前述したように、API管理部22は、アプリケーション側スキーマ32に2つ以上のデータ項目の識別子が示されているアプリケーション側API41については、プラットフォーム側スキーマ33に当該2つ以上のデータ項目の識別子と同じ識別子を含む複数のデータ項目の識別子が示されているプラットフォーム側API51を、対応するプラットフォーム側API51として抽出する。
In step S101, the
API管理部22は、アプリケーション側API41「app_a_api1」について、アプリケーション側スキーマ32から、リクエストデータの第1データ項目の名前「param01」、リクエストデータの第2データ項目の名前「param02」およびレスポンスデータのデータ項目の名前「result」を取得する。API管理部22は、プラットフォーム側API51「default_api1」について、プラットフォーム側スキーマ33から、リクエストデータの第1データ項目の名前「property01」、リクエストデータの第2データ項目の名前「property02」およびレスポンスデータの第1データ項目の名前「result01」を取得する。また、API管理部22は、プラットフォーム側API51「default_api1」について、プラットフォーム側スキーマ33から、リクエストデータの構造として、第1データ項目および第2データ項目が1つのブロック「block01」に格納される構造を特定する。API管理部22は、プラットフォーム側API51「default_api1」について、プラットフォーム側スキーマ33から、レスポンスデータの構造として、第1データ項目が1つのブロック「block02」に格納される構造を特定する。そして、API管理部22は、アプリケーション側API41「app_a_api1」について、リクエストデータの第1データ項目の名前「param01」、リクエストデータの第2データ項目の名前「param02」およびレスポンスデータの第1データ項目の名前「result」と、プラットフォーム側API51「default_api1」のリクエストデータの第1データ項目の名前「property01」、リクエストデータの第2データ項目の名前「property02」およびレスポンスデータの第1データ項目の名前「result01」との紐付けを定義する情報をAPI変換定義34として生成する。この情報には、プラットフォーム側API51「default_api1」のリクエストデータの構造として、第1データ項目および第2データ項目が1つのブロック「block01」に格納される構造を定義する情報と、プラットフォーム側API51「default_api1」のレスポンスデータの構造として、データ項目が1つのブロック「block02」に格納される構造を定義する情報も含まれる。
For the application-
識別子「device_name」および型「string」の組み合わせと、識別子「power_limit」および型「int」の組み合わせと、識別子「return_code」および型「int」の組み合わせは、いずれもデータ項目一覧31において定義されており、アプリケーション開発者およびプラットフォーム開発者の間で共有されている。アプリケーション側スキーマ32は、あらかじめアプリケーション開発者から提供される。プラットフォーム側スキーマ33は、あらかじめプラットフォーム開発者から提供される。
The combination of the identifier “device_name” and the type “string”, the combination of the identifier “power_limit” and the type “int”, and the combination of the identifier “return_code” and the type “int” are all defined in the
アプリケーション側API41「app_a_api1」以外のアプリケーション側API41についても、同様にAPI変換定義34に含まれる情報が生成される。
Information included in the
ステップS102において、API管理部22は、アプリケーション側API41「app_a_api1」を公開する。これにより、アプリケーション開発者がアプリケーション側API41「app_a_api1」を用いてアプリケーション40を開発または改修できるようになる。
In step S102, the
アプリケーション側API41「app_a_api1」以外のアプリケーション側API41についても、同様に公開される。
The application-
公開されたアプリケーション側API41「app_a_api1」を用いて開発または改修されたアプリケーション40が実行され、アプリケーション側API41「app_a_api1」によって生成されたリクエストデータがアプリケーション40から送信されたとする。
It is assumed that the
ステップS103において、API変換部21は、API管理部22により生成されたAPI変換定義34に従って、アプリケーション40から送信されたリクエストデータの第1データ項目の名前「param01」および第2データ項目の名前「param02」を、それぞれプラットフォーム側API51「default_api1」のリクエストデータの第1データ項目の名前「property01」および第2データ項目の名前「property02」に変換する。その際、API変換部21は、プラットフォーム側API51「default_api1」のリクエストデータの構造に合わせて、第1データ項目および第2データ項目を1つのブロック「block01」に格納して、変換後のリクエストデータをプラットフォーム側API51「default_api1」に出力する。
In step S103, the
このように、本実施の形態では、プラットフォーム50の開発者からプラットフォーム側スキーマ33とデータ項目一覧31とが提供される。プラットフォーム側スキーマ33には、APIの識別子、呼び出し方法の定義、リクエストおよびレスポンスのデータ構造およびデータ項目に期待されるデータ実体の割り当て「$property」が定義されている。図示した例は、REST APIの形式での定義となっているがデータベースの検索APIに対する定義でもよい。「REST」は、Representational State Transferの略語である。データ項目一覧31には、データ項目の識別子、型および種別が定義されている。データ項目の種別としては、例えば、データ実体「property」、補足データ「metadata」および操作に伴うデータ「controldata」がある。
As described above, in the present embodiment, the
アプリケーション40の開発者からはアプリケーション側スキーマ32が提供され、APIの公開が要求される。アプリケーション側スキーマ32では、プラットフォーム側スキーマ33と同様に、データ構造およびデータ項目が宣言されている。
The developer of the
API管理部22は、提供されたアプリケーション側スキーマ32からデータ項目に定義されているデータ実体の割り当てを参照し、プラットフォーム側スキーマ33のデータ項目を検索する。API管理部22は、リクエストおよびレスポンスで同様のデータ実体の割り当てを持つプラットフォーム側API51を検索し、最初に見つかったAPIをアプリケーション側API41から変換して利用するAPIとする。API管理部22は、発見したプラットフォーム側API51と対応するアプリケーション側API41とのマッピング定義であるAPI変換定義34を生成し、アプリケーション側API41を公開する。
The
API変換定義34は、公開されたアプリケーション側API41を通じてアプリケーション40から利用可能となる。なお、データ項目を別途管理する構成をとれば、API変換時にデータ形式に応じた値の変換等の拡張も可能である。
The
プラットフォーム側API51に変更があった場合について説明する。
A case where the platform-
プラットフォーム側スキーマ33の変更反映とともにAPI変換定義34の再生成を行うことで、アプリケーション40側の作業を必要とせずに対応できる。
By regenerating the
プラットフォーム側API51にデータ項目の変更があった場合の動作について説明する。API変換定義34の更新の必要性で処置が変わる。
The operation when the data item is changed in the platform-
データ項目の追加があった場合、API変換定義34に更新の必要はないため、特に処置の必要はない。
When a data item is added, there is no need to update the
データ項目の変更があった場合、アプリケーション側API41で使われているデータ項目の変更であれば、API変換定義34の再生成が必要である。アプリケーション側API41で使われていないデータ項目であれば、特に処置の必要はない。アプリケーション側API41で使われているかどうかの判断は、アプリケーション側スキーマ32を検索することで確認できる。
When the data item is changed, if the data item used by the application-
本実施の形態では、API管理部22は、複数のプラットフォーム側API51のいずれかで扱われるデータに含まれるデータ項目の名前が変更された場合、そのデータ項目の名前がAPI変換定義34で定義されている紐付けの対象となっていれば、そのデータ項目の名前の変更をAPI変換定義34に反映する。
In the present embodiment, when the name of a data item included in data handled by any of the plurality of platform-
データ項目の削除があった場合、アプリケーション側API41で使われているデータ項目の削除は、そもそもプラットフォーム50がアプリケーション40の要件を満たせなくなるため認められない。アプリケーション側API41で使われていないデータ項目の削除であれば、特に処置の必要はない。
If the data item is deleted, deletion of the data item used by the application-
プラットフォーム側API51にデータ構造の変更があった場合は、API変換定義34が更新される。
When the data structure is changed in the platform-
本実施の形態では、アプリケーション40側のライフサイクルに対する公開APIの処置が行われる。アプリケーション側API41はアプリケーション40側の要件に応じて動的に公開されるため、要件の変化によって利用されなくなった公開APIを削除する必要がある。そのため、API管理部22は、複数のアプリケーション側API41の利用状況を監視し、利用状況が基準を満たしていないアプリケーション側API41を、複数のアプリケーション側API41を公開しているサイトから削除する。
In the present embodiment, the processing of the public API for the life cycle of the
公開APIの削除は、API管理部22が有効条件35を参照して制御する。有効条件35としては、図9に示したような情報が管理されている。
The deletion of the public API is controlled by the
具体的には、API管理部22は、メトリクス提供サービスにアクセスして公開APIの稼働状況を確認する。API管理部22は、取得したデータから削除判断項目の値を参照し、削除閾値と比較する。API管理部22は、削除閾値を超えた公開APIを削除する。
Specifically, the
***実施の形態の効果の説明***
本実施の形態では、アプリケーション側とプラットフォーム側とでデータ項目の識別子を共通化することにより、設定レベルで前述した変換ロジックと同等の仕組みを実現できる。そのため、本実施の形態によれば、アプリケーション側がプラットフォーム側のAPIの更新に効率的かつ確実に対応できるようになる。
*** Explanation of effect of embodiment ***
In the present embodiment, by sharing the identifier of the data item between the application side and the platform side, a mechanism equivalent to the above-described conversion logic at the setting level can be realized. Therefore, according to the present embodiment, the application side can efficiently and reliably respond to the update of the API on the platform side.
***他の構成***
本実施の形態では、API変換部21およびAPI管理部22の機能がソフトウェアにより実現されるが、変形例として、API変換部21およびAPI管理部22の機能がソフトウェアとハードウェアとの組み合わせにより実現されてもよい。すなわち、API変換部21およびAPI管理部22の機能の一部が専用のハードウェアにより実現され、残りがソフトウェアにより実現されてもよい。
*** Other configuration ***
In the present embodiment, the functions of the
専用のハードウェアは、例えば、単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ロジックIC、GA、FPGA、ASIC、または、これらのうちいくつか、もしくは、すべての組み合わせである。「IC」は、Integrated Circuitの略語である。「GA」は、Gate Arrayの略語である。「FPGA」は、Field−Programmable Gate Arrayの略語である。「ASIC」は、Application Specific Integrated Circuitの略語である。 The dedicated hardware is, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, a logic IC, a GA, an FPGA, an ASIC, or a combination of some or all of these. . “IC” is an abbreviation for Integrated Circuit. “GA” is an abbreviation for Gate Array. “FPGA” is an abbreviation for Field-Programmable Gate Array. “ASIC” is an abbreviation for Application Specific Integrated Circuit.
プロセッサ11および専用のハードウェアは、いずれも処理回路である。すなわち、API変換部21およびAPI管理部22の機能がソフトウェアにより実現されるか、ソフトウェアとハードウェアとの組み合わせにより実現されるかに関わらず、API変換部21およびAPI管理部22の動作は、処理回路により行われる。
The processor 11 and the dedicated hardware are both processing circuits. That is, regardless of whether the functions of the
実施の形態2.
本実施の形態について、主に実施の形態1との差異を、図11から図13を用いて説明する。
Embodiment 2 FIG.
This embodiment will be described mainly with reference to FIG. 11 to FIG.
***構成の説明***
図11を参照して、本実施の形態に係る変換装置10の構成を説明する。
*** Configuration description ***
With reference to FIG. 11, the configuration of
本実施の形態では、データ項目一覧31、プラットフォーム側スキーマ33、API変換定義34および有効条件35のほかに、公開APIアクセスログ36がメモリ12に記憶される。公開APIアクセスログ36は、メトリクス提供サービス用に外部に提供される。
In the present embodiment, a public
本実施の形態では、アプリケーション40からアプリケーション側スキーマ32を含むAPI生成要求が入力される。
In the present embodiment, an API generation request including the application-
***動作の説明***
図12および図13を参照して、本実施の形態に係る変換装置10の動作を説明する。変換装置10の動作は、本実施の形態に係る変換方法に相当する。
*** Explanation of operation ***
The operation of
図12は、変換装置10の、アプリケーション40がトリガとなってAPIを生成する部分のフローを示している。
FIG. 12 shows a flow of a part of the
ステップS201において、API管理部22は、アプリケーション40からアプリケーション側スキーマ32を含むAPI生成要求を受け付ける。API管理部22は、この要求に応じて、アプリケーション側スキーマ32に対応するアプリケーション側API41を生成する。その後、生成されたアプリケーション側API41について、ステップS202以降の処理が行われる。
In step S201, the
ステップS202からステップS204の処理については、図10に示したステップS101からステップS103の処理と同じであるため、説明を省略する。 The processing from step S202 to step S204 is the same as the processing from step S101 to step S103 shown in FIG.
図13は、変換装置10の、有効条件35からAPIが削除される部分のフローを示している。
FIG. 13 shows a flow of a part of the
ステップS211において、API管理部22は、有効条件35を取得する。
In step S211, the
ステップS212において、API管理部22は、メトリクス提供サービスにアクセスして公開APIの稼働状況を取得する。公開APIとは、ステップS203で公開されたアプリケーション側API41のことである。
In step S212, the
ステップS213において、API管理部22は、削除対象のAPIがあるかどうかを判定する。削除対象のAPIとは、有効条件35に含まれる削除判断項目の値が削除閾値を超えた公開APIのことである。削除対象のAPIがあれば、ステップS214の処理が行われる。
In step S213, the
ステップS214において、API管理部22は、削除対象のAPIの公開を停止する。
In step S214, the
***実施の形態の効果の説明*** *** Explanation of effect of embodiment ***
本実施の形態では、アプリケーション40がトリガとなってAPIを生成する部分と、有効条件35からAPIが削除される部分とが変換装置10に備えられることで、ライフサイクル管理が可能となる。
In the present embodiment, the
10 変換装置、11 プロセッサ、12 メモリ、13 通信デバイス、14 レシーバ、15 トランスミッタ、21 API変換部、22 API管理部、23 データ変換機能、24 データ名称変換機能、25 データ構造変換機能、26 変換定義生成機能、27 データ項目管理機能、28 公開API削除機能、31 データ項目一覧、32 アプリケーション側スキーマ、33 プラットフォーム側スキーマ、34 API変換定義、35 有効条件、36 公開APIアクセスログ、40 アプリケーション、41 アプリケーション側API、50 プラットフォーム、51 プラットフォーム側API。
Claims (9)
前記API管理部により生成されたAPI変換定義に従って、前記アプリケーション側APIで扱われるデータに含まれるデータ項目の名前と、前記プラットフォーム側APIで扱われるデータに含まれるデータ項目の名前との間の変換を行うAPI変換部と
を備える変換装置。 An application-side schema indicating the names and identifiers of data items included in data handled by an application-side API that is an application programming interface for using a service is converted by a platform-side API that is an application programming interface for providing the service. The name of the data item shown in the application-side schema and the corresponding data shown in the platform-side schema are checked against the platform-side schema indicating the name and identifier of the data item included in the handled data. An API management unit that generates an API conversion definition that defines an association with an item name;
Conversion between the name of a data item included in data handled by the application-side API and the name of a data item included in data handled by the platform-side API according to the API conversion definition generated by the API management unit A conversion device comprising: an API conversion unit that performs the conversion.
前記API管理部は、前記アプリケーション側スキーマに示されているデータ項目の識別子をキーとして前記プラットフォーム側スキーマを検索することで、対応するプラットフォーム側APIを抽出する請求項1に記載の変換装置。 There are two or more platform-side APIs,
The conversion device according to claim 1, wherein the API management unit extracts the corresponding platform-side API by searching the platform-side schema using an identifier of a data item indicated in the application-side schema as a key.
前記プラットフォーム側APIは、2つ以上あり、
前記API管理部は、前記アプリケーション側スキーマに2つ以上のデータ項目の識別子が示されているアプリケーション側APIについては、前記プラットフォーム側スキーマに当該2つ以上のデータ項目の識別子と同じ識別子を含む複数のデータ項目の識別子が示されているプラットフォーム側APIを、対応するプラットフォーム側APIとして抽出し、前記アプリケーション側スキーマに示されている2つ以上のデータ項目の名前と、抽出したプラットフォーム側APIについて前記プラットフォーム側スキーマに示されている同数のデータ項目の名前との紐付けを定義する情報を前記API変換定義に含める請求項1または2に記載の変換装置。 The application-side API has one or more,
There are two or more platform-side APIs,
For the application-side API in which the identifier of two or more data items is indicated in the application-side schema, the API management unit may include a plurality of identifiers including the same identifier as the identifier of the two or more data items in the platform-side schema. The platform-side API indicating the identifier of the data item is extracted as a corresponding platform-side API, and the names of two or more data items indicated in the application-side schema and the extracted platform-side API are described above. 3. The conversion device according to claim 1, wherein the API conversion definition includes information that defines association with the names of the same number of data items indicated in the platform-side schema. 4.
前記プラットフォーム側スキーマは、前記プラットフォーム側APIで扱われるデータの構造をさらに示す情報であり、
前記API変換部は、前記API変換定義に従って、前記アプリケーション側APIで扱われるデータの構造と、前記プラットフォーム側APIで扱われるデータの構造との間の変換をさらに行う請求項1から4のいずれか1項に記載の変換装置。 The application-side schema is information further indicating a structure of data handled by the application-side API,
The platform-side schema is information further indicating the structure of data handled by the platform-side API,
5. The API conversion unit according to claim 1, further performing a conversion between a data structure handled by the application-side API and a data structure handled by the platform-side API according to the API conversion definition. The conversion device according to claim 1.
前記プラットフォーム側APIで扱われるデータに含まれるデータ項目の名前が変更された場合、そのデータ項目の名前が前記API変換定義で定義されている紐付けの対象となっていれば、そのデータ項目の名前の変更を前記API変換定義に反映するAPI管理部と
を備える変換装置。 A name of a data item included in data handled by an application-side API that is an application programming interface for using a service, and a data item name included in data handled by a platform-side API that is an application programming interface for providing the service. According to the API conversion definition that defines the association with the corresponding data item name, the name of the data item included in the data handled by the application-side API and the name of the data item included in the data handled by the platform-side API An API conversion unit that performs conversion between:
When the name of a data item included in the data handled by the platform-side API is changed, if the name of the data item is a target of association defined in the API conversion definition, the name of the data item is changed. A conversion device comprising: an API management unit for reflecting a name change in the API conversion definition.
サービスを利用するためのアプリケーションプログラミングインタフェースであるアプリケーション側APIで扱われるデータに含まれるデータ項目の名前および識別子を示すアプリケーション側スキーマを、前記サービスを提供するためのアプリケーションプログラミングインタフェースであるプラットフォーム側APIで扱われるデータに含まれるデータ項目の名前および識別子を示すプラットフォーム側スキーマと照合して、前記アプリケーション側スキーマに示されているデータ項目の名前と、前記プラットフォーム側スキーマに示されている、対応するデータ項目の名前との紐付けを定義するAPI変換定義を生成するAPI管理処理と、
前記API管理処理により生成されたAPI変換定義に従って、前記アプリケーション側APIで扱われるデータに含まれるデータ項目の名前と、前記プラットフォーム側APIで扱われるデータに含まれるデータ項目の名前との間の変換を行うAPI変換処理と
を実行させる変換プログラム。 On the computer,
An application-side schema indicating the names and identifiers of data items included in data handled by an application-side API that is an application programming interface for using a service is converted by a platform-side API that is an application programming interface for providing the service. The name of the data item indicated in the application-side schema and the corresponding data indicated in the platform-side schema are checked against the platform-side schema indicating the name and identifier of the data item included in the handled data. An API management process for generating an API conversion definition that defines the association with the item name;
Conversion between the name of a data item included in data handled by the application-side API and the name of a data item included in data handled by the platform-side API according to the API conversion definition generated by the API management processing And a conversion program for executing an API conversion process.
サービスを利用するためのアプリケーションプログラミングインタフェースであるアプリケーション側APIで扱われるデータに含まれるデータ項目の名前と、前記サービスを提供するためのアプリケーションプログラミングインタフェースであるプラットフォーム側APIで扱われるデータに含まれる、対応するデータ項目の名前との紐付けを定義するAPI変換定義に従って、前記アプリケーション側APIで扱われるデータに含まれるデータ項目の名前と、前記プラットフォーム側APIで扱われるデータに含まれるデータ項目の名前との間の変換を行うAPI変換処理と、
前記プラットフォーム側APIで扱われるデータに含まれるデータ項目の名前が変更された場合、そのデータ項目の名前が前記API変換定義で定義されている紐付けの対象となっていれば、そのデータ項目の名前の変更を前記API変換定義に反映するAPI管理処理と
を実行させる変換プログラム。 On the computer,
A name of a data item included in data handled by an application-side API that is an application programming interface for using a service, and a data item name included in data handled by a platform-side API that is an application programming interface for providing the service. According to the API conversion definition that defines the association with the corresponding data item name, the name of the data item included in the data handled by the application-side API and the name of the data item included in the data handled by the platform-side API API conversion processing for converting between and
When the name of a data item included in the data handled by the platform-side API is changed, if the name of the data item is a target of association defined in the API conversion definition, the name of the data item is changed. A conversion program for executing an API management process of reflecting the name change in the API conversion definition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018128557A JP2020009073A (en) | 2018-07-05 | 2018-07-05 | Conversion device and conversion program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018128557A JP2020009073A (en) | 2018-07-05 | 2018-07-05 | Conversion device and conversion program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2020009073A true JP2020009073A (en) | 2020-01-16 |
Family
ID=69151660
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018128557A Pending JP2020009073A (en) | 2018-07-05 | 2018-07-05 | Conversion device and conversion program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2020009073A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09160847A (en) * | 1995-12-08 | 1997-06-20 | Hitachi Ltd | Client server-type distribution processing system |
JP2010219962A (en) * | 2009-03-17 | 2010-09-30 | Ricoh Co Ltd | Information processing apparatus, information processing method, and program |
JP2011258101A (en) * | 2010-06-11 | 2011-12-22 | Tetsuo Kamei | Information utilization system |
JP2012519547A (en) * | 2009-03-04 | 2012-08-30 | マシモ・コーポレイション | Medical monitoring system |
JP2017041158A (en) * | 2015-08-21 | 2017-02-23 | 日本電信電話株式会社 | Api conversion table generator, api conversion table generation method, and api conversion table generation program |
-
2018
- 2018-07-05 JP JP2018128557A patent/JP2020009073A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09160847A (en) * | 1995-12-08 | 1997-06-20 | Hitachi Ltd | Client server-type distribution processing system |
JP2012519547A (en) * | 2009-03-04 | 2012-08-30 | マシモ・コーポレイション | Medical monitoring system |
JP2010219962A (en) * | 2009-03-17 | 2010-09-30 | Ricoh Co Ltd | Information processing apparatus, information processing method, and program |
JP2011258101A (en) * | 2010-06-11 | 2011-12-22 | Tetsuo Kamei | Information utilization system |
JP2017041158A (en) * | 2015-08-21 | 2017-02-23 | 日本電信電話株式会社 | Api conversion table generator, api conversion table generation method, and api conversion table generation program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111033468B (en) | System and method for implementing different types of blockchain contracts | |
US8494996B2 (en) | Creation and revision of network object graph topology for a network performance management system | |
US9817860B2 (en) | Generation and application of correctness-enforced executable filters | |
JP2009512063A (en) | Discover, qualify, and launch software add-in components | |
JP2017515183A (en) | Manage data profiling operations related to data types | |
KR101355273B1 (en) | A computing system, a method for controlling thereof, and a computer-readable recording medium having a computer program for controlling thereof | |
CN104580428A (en) | Data routing method, data management device and distributed storage system | |
CN113434506B (en) | Data management and retrieval method, device, computer equipment and readable storage medium | |
JPWO2020152893A1 (en) | Data management system with tamper detection | |
JP6418419B2 (en) | Method and apparatus for hard disk to execute application code | |
JP2017509997A (en) | System and method for supporting data type conversion in a heterogeneous computing environment | |
US20210157802A1 (en) | Consistent structured data hash value generation across formats and platforms | |
US8136087B2 (en) | In-line processing of standardized text values | |
JP6189266B2 (en) | Data processing apparatus, data processing method, and data processing program | |
JP2020009073A (en) | Conversion device and conversion program | |
CN116578282A (en) | Code generation method, device, electronic equipment and medium | |
CN113010115B (en) | Data processing method in block chain node and related equipment | |
US20180341475A1 (en) | Just In Time Deployment with Package Managers | |
JP2014041501A (en) | Fast reading method for batch processing target data and batch management system | |
US11017032B1 (en) | Document recovery utilizing serialized data | |
JP6746086B2 (en) | Terminal device, operation information report control method by terminal device, and operation information report control program by terminal device | |
US10140155B2 (en) | Dynamically provisioning, managing, and executing tasks | |
JP6895149B1 (en) | Data management system | |
CN114268540B (en) | Rule engine optimization method, device and equipment | |
US11132185B2 (en) | Embedding of multiple versions in monolithic applications during compilation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180705 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190318 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190409 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190524 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20191015 |