JP7367312B2 - Program distribution device and program distribution method - Google Patents

Program distribution device and program distribution method Download PDF

Info

Publication number
JP7367312B2
JP7367312B2 JP2019040401A JP2019040401A JP7367312B2 JP 7367312 B2 JP7367312 B2 JP 7367312B2 JP 2019040401 A JP2019040401 A JP 2019040401A JP 2019040401 A JP2019040401 A JP 2019040401A JP 7367312 B2 JP7367312 B2 JP 7367312B2
Authority
JP
Japan
Prior art keywords
terminal
source code
program
language
information
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
Application number
JP2019040401A
Other languages
Japanese (ja)
Other versions
JP2020144580A (en
Inventor
祐司 菊田
幸太 宮田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2019040401A priority Critical patent/JP7367312B2/en
Publication of JP2020144580A publication Critical patent/JP2020144580A/en
Application granted granted Critical
Publication of JP7367312B2 publication Critical patent/JP7367312B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、プログラム配信装置及びプログラム配信方法に関する。 The present invention relates to a program distribution device and a program distribution method.

従来、プラットフォームの種類が異なる端末に対して同一コードのアプリケーションプログラムを提供するシステムが知られている(特許文献1など参照)。 Conventionally, systems have been known that provide application programs with the same code to terminals with different platform types (see Patent Document 1, etc.).

このシステムでは、各端末のプラットフォームの違いを仮想マシンレイヤで吸収している。 In this system, differences in the platforms of each terminal are absorbed at the virtual machine layer.

特開2001-51857号公報Japanese Patent Application Publication No. 2001-51857

しかしながら、仮想マシン上でのプログラムの実行は、中間言語コードの解釈に負荷がかかるため、実行速度の低下及びI/Oアクセスの低下を招く。 However, executing a program on a virtual machine imposes a load on interpreting intermediate language code, resulting in a decrease in execution speed and I/O access.

本発明はかかる点に鑑みてなされたものであり、端末の機能及び性能を落とすことなく、実行環境が異なる端末に同一のプログラムを提供できるプログラム配信装置及びプログラム配信方法を提供することを目的の1つとする。 The present invention has been made in view of the above, and an object of the present invention is to provide a program distribution device and a program distribution method that can provide the same program to terminals with different execution environments without degrading the functions and performance of the terminals. Let's choose one.

本発明に係るプログラム配信装置の一態様は、一つのプログラムに対し、異なるプログラミング言語を用いたソースコードを管理する管理部から、端末の使用言語情報に基づき、前記端末の実行環境で実行可能な使用プログラミング言語を特定し、前記使用プログラミング言語を用いた前記ソースコードを前記管理部から取得するソースコード取得部と、前記使用プログラミング言語がコンパイル言語である場合、前記ソースコードを前記実行環境で実行可能な実行可能形式ファイルに変換する変換部と、前記使用プログラミング言語がスクリプト言語である場合は前記ソースコードを、前記使用プログラミング言語が前記コンパイル言語である場合は前記実行可能形式ファイルを、前記端末に送信する送信部と、前記端末の実行環境情報に基づいて、前記端末の前記実行環境と同等の検証環境を構築する検証環境構築部と、前記検証環境上での前記ソースコード又は前記実行可能形式ファイルを実行し、アプリケーションプログラムの配信前に前記プログラムの検証を行う検証部と、を具備し、前記ソースコード取得部は、前記ソースコードの取得の要否を、アーキティクチャ情報に含まれるインストールアプリケーション情報にインストールされていないアプリケーションプログラムの情報があったか否かに基づいて判定することを特徴とする。 In one embodiment of the program distribution device according to the present invention, a management unit that manages source codes using different programming languages sends a program to a program that can be executed in the execution environment of the terminal based on information on the language used by the terminal. a source code acquisition unit that identifies a used programming language and acquires the source code using the used programming language from the management unit; and when the used programming language is a compiled language, executes the source code in the execution environment; a converting unit that converts the source code into an executable format file when the programming language used is a script language, and the executable format file when the programming language used is the compiled language; a verification environment construction unit that constructs a verification environment equivalent to the execution environment of the terminal based on execution environment information of the terminal, and a verification environment construction unit that transmits the source code or the executable code on the verification environment. a verification unit that executes a format file and verifies the application program before distributing the application program, and the source code acquisition unit determines whether or not the source code is necessary to acquire, based on information included in architecture information. It is characterized in that the determination is made based on whether or not there is information about an application program that is not installed in the installed application information.

本発明に係るプログラム配信方法の一態様は、端末の使用言語情報に基づき、前記端末の実行環境で実行可能な使用プログラミング言語を特定し、一つのプログラムに対し、異なるプログラミング言語を用いたソースコードを管理する管理部から前記使用プログラミング言語を用いた前記ソースコードを取得する工程と、前記使用プログラミング言語がコンパイル言語である場合、前記ソースコードを前記実行環境で実行可能な実行可能形式ファイルに変換する工程と、前記使用プログラミング言語がスクリプト言語である場合は前記ソースコードを、前記使用プログラミング言語が前記コンパイル言語である場合は前記実行可能形式ファイルを、前記端末に送信する工程と、前記端末の実行環境情報に基づいて、前記端末の前記実行環境と同等の検証環境を構築する工程と、前記検証環境上での前記ソースコード又は前記実行可能形式ファイルを実行し、アプリケーションプログラムの配信前に前記プログラムの検証を行う工程と、を具備し、前記端末に送信する工程は、前記ソースコードの取得の要否を、アーキティクチャ情報に含まれるインストールアプリケーション情報にインストールされていないアプリケーションプログラムの情報があったか否かに基づいて判定することを特徴とする。 One aspect of the program distribution method according to the present invention is to identify a programming language that can be executed in the execution environment of the terminal based on language information of the terminal, and to distribute source code using different programming languages for one program. a step of obtaining the source code using the programming language used from a management unit that manages the programming language; and, if the programming language used is a compiled language, converting the source code into an executable format file that can be executed in the execution environment. a step of transmitting the source code if the programming language used is a scripting language or the executable format file if the programming language used is the compiled language to the terminal ; A step of constructing a verification environment equivalent to the execution environment of the terminal based on execution environment information, and executing the source code or the executable format file on the verification environment, and a step of verifying the program, and the step of transmitting the program to the terminal determines whether or not the source code should be acquired, and the step includes a step of verifying the program, and the step of transmitting the program to the terminal includes the step of verifying the necessity of acquiring the source code by checking whether the information of the application program that is not installed is included in the installed application information included in the architecture information. The feature is that the determination is made based on whether or not there was .

本発明によれば、端末の機能及び性能を落とすことなく、実行環境が異なる端末に同一のプログラムを提供できるプログラム配信装置及びプログラム配信方法を提供することができる。 According to the present invention, it is possible to provide a program distribution device and a program distribution method that can provide the same program to terminals with different execution environments without degrading the functions and performance of the terminals.

第1の実施形態に係るプログラム配信システムを示す全体構成図である。FIG. 1 is an overall configuration diagram showing a program distribution system according to a first embodiment. 第1の実施形態に係るプログラム配信サーバを示す機能ブロック図である。FIG. 2 is a functional block diagram showing a program distribution server according to the first embodiment. 第1の実施形態に係る端末を示す機能ブロック図である。FIG. 2 is a functional block diagram showing a terminal according to the first embodiment. 第1の実施形態に係る端末のアーキティクチャ情報を示す説明図である。FIG. 2 is an explanatory diagram showing architecture information of a terminal according to the first embodiment. 第1の実施形態に係るプログラム配信サーバが行う各処理を示すフローチャートである。3 is a flowchart showing each process performed by the program distribution server according to the first embodiment. 第1の実施形態に係るプログラム配信サーバにおけるコード変換処理の各工程を示すフローチャートである。It is a flowchart which shows each process of the code conversion process in the program distribution server based on 1st Embodiment. 第1の実施形態に係るプログラム配信サーバと端末との間のデータトランザクションを示すシーケンス図である。FIG. 2 is a sequence diagram showing a data transaction between a program distribution server and a terminal according to the first embodiment. 第1の実施形態に係るサーバを実現するためのコンピュータ装置のハードウェア構成を示すブロック図である。1 is a block diagram showing a hardware configuration of a computer device for realizing a server according to a first embodiment. FIG. 第2の実施形態に係るプログラム配信サーバを示す機能ブロック図である。FIG. 2 is a functional block diagram showing a program distribution server according to a second embodiment. 第2の実施形態に係るプログラム配信サーバが行うアプリケーション検証処理の各工程を示すフローチャートである。It is a flowchart which shows each process of the application verification process performed by the program distribution server based on 2nd Embodiment. 第2の実施形態に係るプログラム配信サーバにおける検証環境構築処理の各工程を示すフローチャートである。It is a flowchart which shows each process of verification environment construction processing in a program distribution server concerning a 2nd embodiment. 第2の実施形態における対象アプリケーションと関連アプリケーションとの関係を示す模式図である。FIG. 7 is a schematic diagram showing the relationship between a target application and related applications in a second embodiment. 第2の実施形態に係るプログラム配信サーバにおける検証処理の各工程を示すフローチャートである。It is a flowchart which shows each process of the verification process in the program distribution server concerning a 2nd embodiment. 第2の実施形態における対象アプリケーションと関連アプリケーションとの接続における正常及び異常を示す模式図である。FIG. 7 is a schematic diagram showing normal and abnormal connections between the target application and related applications in the second embodiment.

以下、本実施の形態に係るプログラム配信装置及びプログラム配信方法について、図面を参照して説明する。 Hereinafter, a program distribution device and a program distribution method according to the present embodiment will be described with reference to the drawings.

<概要>
端末においてプログラムが実行される実行環境(プラットフォーム)は様々である。そのうちの一つが、実行環境上で使用されるプログラミング言語(以下、使用プログラミング言語と記載する)である。
<Summary>
There are various execution environments (platforms) in which programs are executed on terminals. One of them is the programming language used in the execution environment (hereinafter referred to as the used programming language).

プログラミング言語のうち高級言語は、その変換形式によって、「コンパイラ言語」と「スクリプト言語」とに大別される。「コンパイラ言語」は、ソースコードを事前に実行環境上で実行可能な形式にコンパイルしておくプログラミング言語であり、例えば、C、C++、Java(登録商標)である。「スクリプト言語」は、ソースコードを実行環境上で解釈しながら実行するプログラミング言語であり、例えば、Python、Perl、PHP、Ruby、JavaScript(登録商標)である。 Among programming languages, high-level languages are broadly classified into "compiler languages" and "scripting languages" depending on their conversion format. A "compiler language" is a programming language in which source code is compiled in advance into an executable format on an execution environment, such as C, C++, or Java (registered trademark). A "script language" is a programming language that executes source code while interpreting it in an execution environment, and includes, for example, Python, Perl, PHP, Ruby, and JavaScript (registered trademark).

コンパイラ言語のうち、C、C++など(以下、「C言語など」と記載する)は、ソースコードを、事前に実行可能形式ファイル(Executable file、単に「実行形式」ともいう)に変換する。より具体的には、ソースコードを、機械語等で記述されたオブジェクトファイルにコンパイルし、オブジェクトファイルとライブラリとをリンクし、実行可能形式ファイルを生成する。 Among compiler languages, C, C++, and the like (hereinafter referred to as "C language, etc.") convert source code into an executable file (also simply referred to as "executable format") in advance. More specifically, the source code is compiled into an object file written in machine language or the like, and the object file and library are linked to generate an executable file.

このようなC言語などは、端末での実行速度が速く、負荷も少ないという利点がある。しかし、コンパイル及びリンクが端末のプロセッサ(CPU)、オペレーションシステム(OS)のようなアーキティクチャに依存する。 The C language and the like have the advantage of being faster to execute on a terminal and having less load. However, compilation and linking depend on architecture such as the terminal's processor (CPU) and operating system (OS).

また、コンパイラ言語のうち、Javaなどは、仮想マシンの上で実行される点で、C、C++などと相違する。Javaなどでは、ソースコードをコンパイルして中間言語コードを生成する。中間言語ファイルは、端末上で実行される仮想マシンにより解釈され、実行される。 Furthermore, among compiler languages, Java and the like differ from C, C++, and the like in that they are executed on a virtual machine. In Java and the like, source code is compiled to generate intermediate language code. The intermediate language file is interpreted and executed by a virtual machine running on the terminal.

仮想マシンには、中間言語コードを逐次解析しながら実行するインタプリタ型と、中間言語コードを読み込むときに機械語等にコンパイルし、実行するコンパイラ型と、があり、両者を組み合わせて使用されることもある。 There are two types of virtual machines: an interpreter type that executes intermediate language code while sequentially analyzing it, and a compiler type that compiles the intermediate language code into machine language and executes it when reading it, and a combination of the two can be used. There is also.

このタイプの高級言語は、仮想マシンが端末のアーキティクチャの違いを吸収するため、中間言語コードを、実行環境が異なる端末どうしで共通化できるという利点がある。しかし、仮想マシンを端末上で実行させる必要があり、仮想マシン上でのプログラムの実行は、中間言語コードの解釈に負荷がかかるため、実行速度の低下及びI/Oアクセスの低下を招く。 This type of high-level language has the advantage that intermediate language code can be shared between terminals with different execution environments because the virtual machine absorbs differences in terminal architecture. However, it is necessary to run a virtual machine on a terminal, and executing a program on a virtual machine places a load on the interpretation of intermediate language code, resulting in a decrease in execution speed and I/O access.

一方、スクリプト言語は、端末上で実行されるインタプリタにより逐次解釈しながら実行されるため、事前にソースコードから他の形式に変換する必要はない。また、インタプリタが端末のアーキティクチャの違いを吸収するため、ソースコードを、実行環境が異なる端末どうしで共通化できるという利点がある。しかし、インタプリタにソースコードを逐次解釈しながら実行させるため、実行速度が遅い。 On the other hand, scripting languages are executed while being sequentially interpreted by an interpreter running on a terminal, so there is no need to convert the source code into another format in advance. Furthermore, since the interpreter absorbs differences in terminal architecture, there is an advantage that the source code can be shared between terminals with different execution environments. However, since the interpreter executes the source code while sequentially interpreting it, the execution speed is slow.

上述のような高級言語は、そのタイプによって利点及び欠点がある。従来は、実行速度が高速なC言語などの、事前の変換にコンパイラ及びリンカを用いる言語が多く使われていた。しかし、CPUの高速化に伴い、スクリプト言語やJavaなどのインタプリタ又は仮想マシンを用いる言語が採用されるようになってきた。その理由として、スクリプト言語やJavaなどは、端末の実行環境にインタプリタ及び仮想マシンが存在しなくても、ネットワークを介した配信により、インタプリタ又は仮想マシンを追加し、プログラムの追加及び実行が可能になることが挙げられる。 High-level languages such as those described above have advantages and disadvantages depending on their type. Conventionally, languages that use compilers and linkers for preliminary conversion, such as the C language, which has high execution speed, have often been used. However, as CPU speeds have increased, languages that use interpreters or virtual machines, such as script languages and Java, have come into use. The reason for this is that with scripting languages such as Java, programs can be added and executed by adding an interpreter or virtual machine through distribution via a network, even if an interpreter or virtual machine does not exist in the execution environment of the terminal. There are many things that can happen.

このような背景から、インターネット等の通信ネットワークを介して端末からの要求に応じてプログラムを配信するプログラム配信システムには、実行環境が異なる端末に同一のプログラムを提供できることが望まれる。しかしながら、端末の機能及び性能を落とすことなく、実行環境が異なる端末に同一のプログラムを提供できるものは知られていない。 Against this background, it is desirable for a program distribution system that distributes programs in response to requests from terminals via a communication network such as the Internet to be able to provide the same program to terminals with different execution environments. However, there is no known program that can provide the same program to terminals with different execution environments without degrading the functions and performance of the terminals.

さらに、プログラム配信システムにおいて、端末とサーバとで実行環境が異なるため、端末にアプリケーションを配信後、再度検証を行わなくてはならないという課題もあった。 Furthermore, in the program distribution system, since the execution environments are different between the terminal and the server, there is a problem in that after the application is distributed to the terminal, it must be verified again.

そこで、本発明者らは、上記課題を解決すべく鋭意検討した結果、一つのプログラムに対し、異なるプログラミング言語を用いたソースコードを用意しておき、端末の使用言語情報に基づき、端末の実行環境で実行可能な使用プログラミング言語を特定し、使用プログラミング言語に応じて前記端末の実行環境で実行可能な形式でプログラムを端末に送信することにより、端末の機能及び性能を落とさないことに寄与することを見出だし、本発明を完成した。 Therefore, as a result of intensive study to solve the above problems, the inventors of the present invention prepared source codes using different programming languages for one program, and based on the language information of the terminal, the terminal executed By identifying the programming language used that can be executed in the environment and sending the program to the terminal in a format that can be executed in the execution environment of the terminal according to the programming language used, it contributes to not degrading the functionality and performance of the terminal. They discovered this and completed the present invention.

すなわち、本実施の形態に係るプログラム配信装置は、一つのプログラムに対し、異なるプログラミング言語を用いたソースコードを管理する管理部から、端末の使用言語情報に基づき、前記端末の実行環境で実行可能な使用プログラミング言語を特定し、前記使用プログラミング言語を用いた前記ソースコードを前記管理部から取得するソースコード取得部と、前記使用プログラミング言語がコンパイル言語である場合、前記ソースコードを前記実行環境で実行可能な実行可能形式ファイルに変換する変換部と、前記使用プログラミング言語がスクリプト言語である場合は前記ソースコードを、前記使用プログラミング言語が前記コンパイル言語である場合は前記実行可能形式ファイルを、前記端末に送信する送信部と、を具備することを特徴とする。 That is, the program distribution device according to the present embodiment allows a management unit that manages source codes using different programming languages to execute one program in the execution environment of the terminal based on the language information of the terminal. a source code acquisition unit that identifies a programming language to be used and acquires the source code using the programming language from the management unit; and if the programming language to be used is a compiled language, the source code is acquired in the execution environment; a conversion unit that converts the executable format file into an executable format file, the source code when the programming language used is a script language, and the executable format file when the programming language used is the compiled language; A transmitter that transmits data to a terminal.

すなわち、本実施の形態に係るプログラム配信方法は、端末の使用言語情報に基づき、前記端末の実行環境で実行可能な使用プログラミング言語を特定し、一つのプログラムに対し、異なるプログラミング言語を用いたソースコードを管理する管理部から前記使用プログラミング言語を用いた前記ソースコードを取得する工程と、前記使用プログラミング言語がコンパイル言語である場合、前記ソースコードを前記実行環境で実行可能な実行可能形式ファイルに変換する工程と、前記使用プログラミング言語がスクリプト言語である場合は前記ソースコードを、前記使用プログラミング言語が前記コンパイル言語である場合は前記実行可能形式ファイルを、前記端末に送信する工程と、を具備することを特徴とする。 That is, the program distribution method according to the present embodiment identifies a programming language that can be executed in the execution environment of the terminal based on the language information of the terminal, and distributes source code using different programming languages to one program. a step of obtaining the source code using the programming language used from a management unit that manages the code; and, if the programming language used is a compiled language, converting the source code into an executable format file that can be executed in the execution environment; and transmitting the source code, if the programming language used is a scripting language, or the executable format file, if the programming language used is the compiled language, to the terminal. It is characterized by

また、本発明者らは、さらに検討を加えた結果、端末の実行環境情報に基づいて、端末の実行環境と同等の検証環境を構築し、検証環境上でのソースコード又は実行可能形式ファイルを実行し、プログラムの検証を行うにより、配信前に実行環境と同等の検証環境下で検証を行った上でプログラムを配信することを想到するに至った。 In addition, as a result of further study, the inventors constructed a verification environment equivalent to the terminal execution environment based on the terminal execution environment information, and created a verification environment that is equivalent to the terminal execution environment and runs the source code or executable file on the verification environment. By executing the program and verifying the program, we came up with the idea of distributing the program after verifying it in a verification environment equivalent to the execution environment before distribution.

以下、図1~図14を参照して、本実施の形態に係るプログラム配信装置及びプログラム配信方法について詳細に説明する。以下の説明では、本発明のプログラムとして、アプリケーションプログラムを例に挙げるが、これに特に限定されず、システムプログラムであってもよい。 The program distribution apparatus and program distribution method according to the present embodiment will be described in detail below with reference to FIGS. 1 to 14. In the following description, an application program will be exemplified as a program of the present invention, but the program is not particularly limited to this, and may be a system program.

<第1の実施形態>
(システム)
図1は、第1の実施形態に係るプログラム配信システムを示す全体構成図である。図1に示すプログラム配信システム1は、プログラム配信サーバ11と、ネットワーク12と、複数の端末13a~13nと、で構成されている。
<First embodiment>
(system)
FIG. 1 is an overall configuration diagram showing a program distribution system according to a first embodiment. The program distribution system 1 shown in FIG. 1 includes a program distribution server 11, a network 12, and a plurality of terminals 13a to 13n.

プログラム配信サーバ11は、ネットワーク12を介して、端末13a~13nにアプリケーションプログラムを配信する情報処理装置である。 The program distribution server 11 is an information processing device that distributes application programs to the terminals 13a to 13n via the network 12.

端末13a~13nは、プログラム配信サーバ11から配信されたアプリケーションプログラムを実行する情報処理装置である。端末13a~13nは、例えば、携帯電話、スマートフォン、タブレット型端末などの携帯端末(移動通信端末)、又は、パーソナルコンピュータ(PC:Personal Computer)などの固定通信端末であってもよい。 The terminals 13a to 13n are information processing devices that execute application programs distributed from the program distribution server 11. The terminals 13a to 13n may be, for example, mobile terminals (mobile communication terminals) such as mobile phones, smartphones, and tablet terminals, or fixed communication terminals such as personal computers (PCs).

ネットワーク12は、インターネット、モバイルネットワーク、LAN(Local Area Network)、WAN(Wide Area Network)などの様々なネットワークを含む。なお、ネットワークは、無線、有線又はこれらの組み合わせで構成されてもよい。例えば、無線通信方式としては、Bluetooth(登録商標)、無線LAN(例えば、IEEE802.11規格に準拠)、LTE(Long Term Evolution)、又はその他の無線通信方式を利用することができる。 The network 12 includes various networks such as the Internet, a mobile network, a LAN (Local Area Network), and a WAN (Wide Area Network). Note that the network may be configured wirelessly, wired, or a combination thereof. For example, as the wireless communication method, Bluetooth (registered trademark), wireless LAN (for example, based on the IEEE802.11 standard), LTE (Long Term Evolution), or other wireless communication methods can be used.

(プログラム配信サーバ)
図2は、第1の実施形態に係るプログラム配信サーバ11を示す機能ブロック図である。図2に示すように、本発明のプログラム配信装置の一例であるプログラム配信サーバ11は、アーキティクチャ情報取得部101、ソースコード取得部102、コード変換部103及び配信部104で構成されている。
(Program distribution server)
FIG. 2 is a functional block diagram showing the program distribution server 11 according to the first embodiment. As shown in FIG. 2, the program distribution server 11, which is an example of the program distribution device of the present invention, includes an architecture information acquisition section 101, a source code acquisition section 102, a code conversion section 103, and a distribution section 104. .

アーキティクチャ情報取得部101は、ネットワーク12(図1参照)を介して、端末13(図1に示す端末13a~13nを代表する)からアーキティクチャ情報を取得する処理(以下、「アーキティクチャ情報取得処理」と記載する)を行うように構成されている。アーキティクチャ情報は、端末13を構成するコンピュータの設計思想及び構造に関する情報である。アーキティクチャ情報の詳細は後述する。 The architecture information acquisition unit 101 performs a process (hereinafter referred to as “architecture information The computer is configured to perform a process of obtaining information on the computer. The architecture information is information regarding the design philosophy and structure of the computer that constitutes the terminal 13. Details of the architecture information will be described later.

ソースコード取得部102は、ネットワーク12を介して、プログラム管理サーバ14からソースコードを取得する。 The source code acquisition unit 102 acquires source code from the program management server 14 via the network 12.

プログラム管理サーバ14は、本発明の管理部の一例であり、一つのアプリケーションプログラムに対し、異なるプログラミング言語を用いたソースコードを記憶している。より具体的には、プログラム管理サーバ14は、ストレージ1003(図8参照)に、ソースコードを、以下の項目を含むレコードを複数格納したデータベースを備えている。
・ソースコードID
・アプリケーションプログラムID
・開発言語ID
・ソースコードファイル
・適合するインタプリタ又は仮想マシンに関する情報
The program management server 14 is an example of the management unit of the present invention, and stores source codes using different programming languages for one application program. More specifically, the program management server 14 includes a database in the storage 1003 (see FIG. 8) that stores source code and a plurality of records including the following items.
・Source code ID
・Application program ID
・Development language ID
・Source code file ・Information about compatible interpreter or virtual machine

ソースコードIDは、ソースコードに対してユニークに付与された識別情報である。また、アプリケーションプログラムIDは、アプリケーションプログラムに対してユニークに付与された識別情報である。また、開発言語IDは、ソースコードに用いられているプログラミング言語に対してユニークに付与された識別情報である。これらの識別情報は、シリアルナンバー、英数字の組み合わせからなるコード、文字列のいずれであってもよく、特に限定されない。 The source code ID is identification information uniquely assigned to the source code. Further, the application program ID is identification information uniquely given to the application program. Further, the development language ID is identification information uniquely assigned to the programming language used in the source code. This identification information may be a serial number, a code consisting of a combination of alphanumeric characters, or a character string, and is not particularly limited.

ソースコードファイルは、アプリケーションプログラムのためのソースコードの本体である。ソースコードファイルに代えて、ソースコードファイルの保存場所を示すパスを記憶しておいてもよい。 A source code file is the body of source code for an application program. Instead of the source code file, a path indicating the storage location of the source code file may be stored.

適合するインタプリタ又は仮想マシンに関する情報とは、ソースコードファイルに、スクリプト言語又は仮想マシンを使用するコンパイラ言語が用いられている場合に用いられ、例えば、インタプリタの名称及びバージョン、又は、仮想マシンの名称及びバージョンであるが、特に限定されない。 Information about a compatible interpreter or virtual machine is used when the source code file uses a scripting language or a compiler language that uses a virtual machine, such as the name and version of the interpreter or the name of the virtual machine. and version, but are not particularly limited.

プログラム管理サーバ14は、プログラム配信サーバ11からの要求に応じ、アプリケーションプログラムID及び開発言語IDをキーとして、データベースを参照し、ソースコードファイルを検索し、プログラム配信サーバ11に送信することができる。また、ソースコードファイルを検索した結果、該当するものがなかった場合には、その旨を示す通知を送信することができる。 In response to a request from the program distribution server 11, the program management server 14 can refer to the database, search for a source code file, and transmit it to the program distribution server 11 using the application program ID and development language ID as keys. Additionally, if a source code file is searched and no matching file is found, a notification to that effect can be sent.

コード変換部103は、本発明の変換部の一例であり、ソースコードファイルを実行可能形式ファイルに変換する処理(以下、「コード変換処理」と記載する)を行うように構成されている。コード変換処理の詳細については、後述する。 The code conversion unit 103 is an example of a conversion unit of the present invention, and is configured to perform a process of converting a source code file into an executable file (hereinafter referred to as “code conversion process”). Details of the code conversion process will be described later.

配信部104は、本発明の送信部の一例であり、ネットワーク12(図2参照)を介して、実行可能形式ファイル又はソースコードファイルを、端末13に送信する処理(以下、「配信処理」と記載する)を行うように構成されている。 The distribution unit 104 is an example of the transmission unit of the present invention, and performs a process (hereinafter referred to as “distribution process”) of transmitting an executable file or a source code file to the terminal 13 via the network 12 (see FIG. 2). is configured to do the following:

(端末)
図3は、第1の実施形態に係る端末13を示す機能ブロック図である。図3A~図3Cに示す端末13A、13B、13Cは、実行環境が異なる点で相違する。まず図3Aを参照して、端末13A、13B、13Cに共通する構成について説明する。図3B、図3Cにおいて、図3Aに示す端末13Aと同じ構成については同一の符号を付与し、説明を省略する。
(terminal)
FIG. 3 is a functional block diagram showing the terminal 13 according to the first embodiment. The terminals 13A, 13B, and 13C shown in FIGS. 3A to 3C are different in that their execution environments are different. First, the configuration common to terminals 13A, 13B, and 13C will be described with reference to FIG. 3A. In FIGS. 3B and 3C, the same components as the terminal 13A shown in FIG. 3A are given the same reference numerals, and the description thereof will be omitted.

図3Aに示すように、端末13Aは、アプリケーションプログラムを実行するための実行環境として、ハードウェア(HW)21、及び、オペレーションシステム(OS)22を備えている。また、アーキティクチャ情報23が、ストレージ1003(図8参照)に記憶されている。 As shown in FIG. 3A, the terminal 13A includes hardware (HW) 21 and an operating system (OS) 22 as an execution environment for executing application programs. Additionally, architecture information 23 is stored in the storage 1003 (see FIG. 8).

図3Aに示す端末13Aは、プログラミング言語がC言語である実行環境を備えている。C言語が用いられたアプリケーションプログラム(以下、「Cアプリ」と記載する)24は、OS22上で実行可能である。 The terminal 13A shown in FIG. 3A has an execution environment in which the programming language is C language. An application program (hereinafter referred to as "C application") 24 using the C language is executable on the OS 22.

図3Bに示す端末13Bは、使用するプログラミング言語がPythonである実行環境を備えている。Python言語が用いられたアプリケーションプログラム(以下、「Pythonアプリ」と記載する)25は、OS22により実行されるインタプリタ(以下、「Pythonインタプリタ」と記載する)26により実行可能である。 The terminal 13B shown in FIG. 3B includes an execution environment in which the programming language used is Python. An application program 25 using the Python language (hereinafter referred to as "Python application") can be executed by an interpreter (hereinafter referred to as "Python interpreter") 26 executed by the OS 22.

図3Cに示す端末13Cは、使用するプログラミング言語がJavaである実行環境を備えている。Java言語が用いられたアプリケーションプログラム(以下、「Javaアプリ」と記載する)27は、OS22により実行される仮想マシン(以下、「Java VM」と記載する)28により実行可能である。 The terminal 13C shown in FIG. 3C is equipped with an execution environment in which the programming language used is Java. An application program (hereinafter referred to as "Java application") 27 using the Java language can be executed by a virtual machine (hereinafter referred to as "Java VM") 28 executed by the OS 22.

(アーキティクチャ情報)
図4は、第1の実施形態に係る端末13A、13B、13Cのアーキティクチャ情報を示す説明図である。
(Architecture information)
FIG. 4 is an explanatory diagram showing architecture information of the terminals 13A, 13B, and 13C according to the first embodiment.

図4に示すように、アーキティクチャ情報は、インストールアプリケーション情報と、エンジニアリング情報と、を含む。インストールアプリケーション情報は、本発明の実行環境情報の一例であり、端末13A、13B、13Cにインストールされているアプリケーションプログラムに関する情報であり、例えば、アプリケーションプログラムが行う処理内容情報(例えば、計測処理、演算処理、入力処理、出力処理)、アプリケーションプログラムのバージョン情報を含む。 As shown in FIG. 4, the architecture information includes installed application information and engineering information. The installed application information is an example of the execution environment information of the present invention, and is information regarding the application programs installed on the terminals 13A, 13B, and 13C. processing, input processing, output processing), and application program version information.

また、エンジニアリング情報は、本発明の使用言語情報の一例である開発言語、本発明の実行環境情報の一例であるインタプリタ情報(名称及びバージョン)、コンパイル条件及びリンク条件を含む。 Further, the engineering information includes a development language which is an example of language information used in the present invention, interpreter information (name and version) which is an example of execution environment information of the present invention, compile conditions, and link conditions.

(プログラム配信方法)
以下、上述のような構成からなるプログラム配信システム1におけるプログラム配信方法について説明する。図5は、第1の実施形態に係るプログラム配信サーバ11が行う各処理を示すフローチャートである。
(Program distribution method)
Hereinafter, a program distribution method in the program distribution system 1 configured as described above will be explained. FIG. 5 is a flowchart showing each process performed by the program distribution server 11 according to the first embodiment.

図5に示すように、アーキティクチャ情報取得部101(図2参照)は、端末13に、ネットワーク12を介して、接続要求を送信する(S1)。 As shown in FIG. 5, the architecture information acquisition unit 101 (see FIG. 2) transmits a connection request to the terminal 13 via the network 12 (S1).

次に、アーキティクチャ情報取得部101は、端末13からアーキティクチャ情報を受信できたか否か判定する(S2)。S2において判定がNoであった場合、異常として終了する(S3)。一方、S2において判定がYesであった場合、ソースコード取得部102(図2参照)は、プログラム管理サーバ14からソースコードファイルを取得する(S4)。 Next, the architecture information acquisition unit 101 determines whether the architecture information could be received from the terminal 13 (S2). If the determination is No in S2, the process ends as an abnormality (S3). On the other hand, if the determination in S2 is Yes, the source code acquisition unit 102 (see FIG. 2) acquires the source code file from the program management server 14 (S4).

具体的には、ソースコード取得部102は、取得要求を、プログラム管理サーバ14に送信する。取得要求は、S1の接続要求に応じて端末13から送信されたアーキティクチャ情報(図4参照)に含まれる開発言語に対応する開発言語ID、及び、配信対象のアプリケーションプログラムに対応するアプリケーションプログラムIDを含む。プログラム管理サーバ(図2参照)は、取得要求に含まれる開発言語ID及びアプリケーションプログラムIDをキーとして、データベースを検索し、検索されたソースコードファイルを、ソースコード取得部102に送信する。 Specifically, the source code acquisition unit 102 transmits an acquisition request to the program management server 14. The acquisition request includes the development language ID corresponding to the development language included in the architecture information (see FIG. 4) sent from the terminal 13 in response to the connection request of S1, and the application program corresponding to the application program to be distributed. Contains ID. The program management server (see FIG. 2) searches the database using the development language ID and application program ID included in the acquisition request as keys, and sends the searched source code file to the source code acquisition unit 102.

なお、ソースコードファイルの取得の要否は、ソースコード取得部102が、アーキティクチャ情報に含まれるインストールアプリケーション情報に基づいて判定することができる。具体的には、端末13にインストールされていないアプリケーションプログラムがあったとき、又は、インストール済みのアプリケーションプログラムのバージョンが古いときに、ソースコードファイルの取得を行うと判定することができる。このような判定により、アプリケーションプログラムの配信の要否を決めることができる。 Note that the source code acquisition unit 102 can determine whether it is necessary to acquire the source code file based on the installed application information included in the architecture information. Specifically, it can be determined that the source code file is to be acquired when there is an application program that has not been installed on the terminal 13 or when the version of the installed application program is old. Through such a determination, it is possible to decide whether or not the application program needs to be distributed.

次に、コード変換部103(図2参照)が、取得されたソースコードファイルを必要に応じて適切な形式に変換するコード変換処理を実行する(S5)。 Next, the code conversion unit 103 (see FIG. 2) executes code conversion processing to convert the acquired source code file into an appropriate format as necessary (S5).

(コード変換処理)
図6は、第1の実施の形態に係るプログラム配信サーバ11におけるコード変換処理の各工程を示すフローチャートである。図6に示すように、まず、コード変換部103(図2参照)は、開発言語IDに基づいて、ソースコードファイルに用いられているプログラム言語(以下、「使用プログラミング言語」と記載する)が、C言語か否か判定する(S10)。
(Code conversion process)
FIG. 6 is a flowchart showing each step of code conversion processing in the program distribution server 11 according to the first embodiment. As shown in FIG. 6, first, the code conversion unit 103 (see FIG. 2) determines the programming language used in the source code file (hereinafter referred to as "programming language used") based on the development language ID. , it is determined whether the language is C (S10).

S10における判定がYesであった場合、コード変換部103は、コンパイル・リンク処理を実施する(S11)。コンパイル・リンク処理の詳細については後述する。次いで、コード変換部103は、コンパイル・リンク処理を正常に終了できたか否か判定する(S12)。S12において判定がNoであった場合、異常として終了する(S13)。S12において判定がYesであった場合、コンパイル・リンク処理で生成された実行可能形式ファイルから配信のためのパッケージを作成する(S14)。その後、コード変換処理を正常に終了する(S15)。 If the determination in S10 is Yes, the code conversion unit 103 performs compile/link processing (S11). Details of the compile/link process will be described later. Next, the code conversion unit 103 determines whether the compile/link process was successfully completed (S12). If the determination is No in S12, the process ends as an abnormality (S13). If the determination is Yes in S12, a package for distribution is created from the executable file generated by the compile/link process (S14). Thereafter, the code conversion process is normally ended (S15).

一方、S10における判定がNoであった場合、コード変換部103は、開発言語IDに基づいて、使用プログラミング言語がPythonであるか否か判定する(S16)。 On the other hand, if the determination in S10 is No, the code conversion unit 103 determines whether the programming language used is Python based on the development language ID (S16).

S16における判定がYesであった場合、コード変換部103は、Phthonインタプリタのバージョンチェック処理を実施する(S17)。バージョンチェック処理の詳細については後述する。次いで、コード変換部103は、バージョンチェック処理を正常に終了できたか否か判定する(S18)。S18において判定がNoであった場合、異常として終了する(S19)。S18において判定がYesであった場合、ソースコードファイルからパッケージを作成する(S14)。その後、コード変換処理を正常に終了する(S15)。 If the determination in S16 is Yes, the code conversion unit 103 performs a version check process of the Phthon interpreter (S17). Details of the version check process will be described later. Next, the code conversion unit 103 determines whether or not the version check process was successfully completed (S18). If the determination is No in S18, the process ends as an abnormality (S19). If the determination is Yes in S18, a package is created from the source code file (S14). Thereafter, the code conversion process is normally ended (S15).

一方、S16における判定がNoであった場合、コード変換部103は、開発言語IDに基づいて、使用プログラミング言語がJavaであるか否か判定する(S20)。 On the other hand, if the determination in S16 is No, the code conversion unit 103 determines whether the programming language used is Java based on the development language ID (S20).

S20における判定がYesであった場合、コード変換部103は、バイトコード変換処理を実施する(S21)。バイトコード変換処理の詳細については後述する。次いで、コード変換部103は、バイトコード変換処理を正常に終了できたか否か判定する(S22)。S22において判定がNoであった場合、異常として終了する(S23)。S22において判定がYesであった場合、生成されたバイトコードファイルからパッケージを作成する(S14)。その後、コード変換処理を正常に終了する(S15)。一方、S20における判定がNoであった場合、コード変換部103は、異常として終了する(S23)。 If the determination in S20 is Yes, the code conversion unit 103 performs bytecode conversion processing (S21). Details of the bytecode conversion process will be described later. Next, the code conversion unit 103 determines whether the bytecode conversion process was successfully completed (S22). If the determination is No in S22, the process ends as abnormal (S23). If the determination is Yes in S22, a package is created from the generated bytecode file (S14). Thereafter, the code conversion process is normally ended (S15). On the other hand, if the determination in S20 is No, the code conversion unit 103 terminates as an abnormality (S23).

図5に戻り、コード変換処理(S5)が正常に終了したならば、配信部104は、パッケージを端末13(図2参照)に配信する(S6)。次いで、配信部104は、パッケージを受信した端末13からの配信されたアプリケーションプログラムを起動した結果(OK又はNG)を受信し、アプリ起動が成功したか否か判定する(S7)。S7における判定がYesであった場合、配信部104は、正常に処理を終了する(S8)。S7における判定がNoであった場合、配信部104は、異常として終了する(S9)。 Returning to FIG. 5, if the code conversion process (S5) is successfully completed, the distribution unit 104 distributes the package to the terminal 13 (see FIG. 2) (S6). Next, the distribution unit 104 receives the result of launching the distributed application program (OK or NG) from the terminal 13 that received the package, and determines whether the application launch was successful (S7). If the determination in S7 is Yes, the distribution unit 104 normally ends the process (S8). If the determination in S7 is No, the distribution unit 104 terminates the process as abnormal (S9).

(C言語コンパイル・リンク処理)
図6に示すコンパイル・リンク処理(S11)の詳細について説明する。コンパイル・リンク処理(S11)は、コード変換部103(図2参照)に含まれるコンパイラ及びリンカにより行われる。コンパイラ及びリンカは、当業者であればその名称から容易に理解できるであろう。
(C language compilation/link processing)
Details of the compile/link process (S11) shown in FIG. 6 will be explained. The compile/link process (S11) is performed by the compiler and linker included in the code converter 103 (see FIG. 2). Compilers and linkers will be easily understood by those skilled in the art from their names.

コンパイラによるコンパイルは、アーキティクチャ情報の、エンジニアリング情報に含まれるコンパイル条件に従って行われる。コンパイル条件は、例えば、プロセッサ名、コンパイラソフトウェア名、バージョン、メーカ名及びコンパイルオプションであるが、特に限定されない。 Compilation by the compiler is performed according to the compilation conditions included in the engineering information of the architecture information. Compilation conditions include, for example, processor name, compiler software name, version, manufacturer name, and compile options, but are not particularly limited.

また、リンカによるリンクは、アーキティクチャ情報の、エンジニアリング情報に含まれるリンク条件に従って行われる。リンク条件は、例えば、リンカソフトウェア名、バージョン、メーカ名及びリンクオプションであるが、特に限定されない。 Further, linking by the linker is performed according to link conditions included in the engineering information of the architecture information. Link conditions include, for example, linker software name, version, manufacturer name, and link option, but are not particularly limited.

S11で、端末13A(図3A参照)から取得したアーキティクチャ情報のエンジニアリング情報内のコンパイル条件とリンク条件を使用することで、端末13Aに適合した実行可能形式のバイナリコードファイル(実行可能形式ファイル)が生成できる。 In S11, by using the compile conditions and link conditions in the engineering information of the architecture information acquired from the terminal 13A (see FIG. 3A), a binary code file (executable format file) in an executable format compatible with the terminal 13A is created. ) can be generated.

より具体的には、コンパイル条件を参照し、コンパイラソフトウェア名、バージョン及びメーカ名が一致するコンパイラを準備し、プロセッサ名とコンパイルオプションを指定して、コンパイルを実行する。 More specifically, the compiler refers to the compile conditions, prepares a compiler with a matching compiler software name, version, and manufacturer name, specifies the processor name and compile options, and executes compilation.

また、リンクは、リンク条件を参照し、リンカソフト名及びバージョンが一致するリンカを準備して、リンクオプションを指定して、リンクを実行する。その後、図6のS14において、コンパイルとリンク後のバイナリーコード化された実行可能形式ファイルを、配信パッケージ化する。 Also, for linking, refer to the linking conditions, prepare a linker with a matching linker software name and version, specify link options, and execute the link. Thereafter, in S14 of FIG. 6, the compiled and linked binary coded executable format file is packaged for distribution.

(Pythonバージョンチェック処理)
Python言語のインタプリタ上で動作するプログラム(ソースコードファイル)は、インタプリタのバージョンによって使用できるライブラリや関数が追加及び廃止があるので、一致させておかないと、端末でプログラムを動作させることができない。そこで、プログラム管理サーバ14のデータベースにあるPython言語で記述されたプログラムが、端末13B(図3B参照)に実装されているインタプリタ26で動作するバージョンか否かを確認することが好ましい。
(Python version check process)
For programs (source code files) that run on a Python language interpreter, libraries and functions that can be used may be added or abolished depending on the version of the interpreter, so unless they match, the program will not be able to run on a terminal. Therefore, it is preferable to check whether the program written in the Python language in the database of the program management server 14 is a version that can be operated on the interpreter 26 installed in the terminal 13B (see FIG. 3B).

このため、Pythonバージョンチェック処理(S17)において、エンジニアリング情報(図4参照)内のインタプリタ名及びインタプリタバージョンが、プログラム管理サーバ14からソースコード取得部102が取得したソースコードファイルのものと一致するか否かを確認する。 Therefore, in the Python version check process (S17), it is determined whether the interpreter name and interpreter version in the engineering information (see FIG. 4) match those of the source code file acquired by the source code acquisition unit 102 from the program management server 14. Check whether or not.

本実施の形態では、一致しない場合(S18における判定でNo)に異常として終了している(S19)が、これに限定されない。例えば、ソースコード取得部102が取得したソースコードファイルに適合するインタプリタを、ソースコードファイルと共に配信パッケージ化し、端末13Bに配信してもよい。 In the present embodiment, if they do not match (No in the determination in S18), the process ends as an abnormality (S19), but the present invention is not limited to this. For example, an interpreter compatible with the source code file acquired by the source code acquisition unit 102 may be packaged for distribution together with the source code file and distributed to the terminal 13B.

(Java言語のバイトコード変換処理)
Java言語の仮想マシン(Java VM)上で動作するバイトコードが用いられたプログラム(バイトコードファイル又は中間言語ファイル)は、仮想マシンのバージョンによって使用できるライブラリや関数が追加及び廃止があるので、一致させておかないと、端末でプログラムを動作させることができない。そこで、プログラム管理サーバ14のデータベースにあるJava言語で記述されたソースコードファイルが、端末13C(図3C参照)に実装されているJava VM28で動作するバージョンか否かを確認することが好ましい。
(Java language bytecode conversion process)
Programs that use bytecode (bytecode files or intermediate language files) that run on a Java language virtual machine (Java VM) may not match, as libraries and functions that can be used may be added or abolished depending on the version of the virtual machine. Otherwise, you will not be able to run programs on your terminal. Therefore, it is preferable to check whether the source code file written in the Java language in the database of the program management server 14 is a version that can run on the Java VM 28 installed in the terminal 13C (see FIG. 3C).

このため、バイトコード変換処理(S21参照)において、エンジニアリング情報(図4参照)内の仮想マシン名及びバージョンが、プログラム管理サーバ14からソースコード取得部102が取得したソースコードファイルのものと一致するか否かを確認する。 Therefore, in the bytecode conversion process (see S21), the virtual machine name and version in the engineering information (see FIG. 4) match those of the source code file acquired by the source code acquisition unit 102 from the program management server 14. Check whether or not.

本実施の形態では、一致しない場合(S22における判定でNo)に異常として終了している(S23)が、これに限定されない。例えば、ソースコード取得部102が取得したソースコードファイルに適合する仮想マシンを、ソースコードファイルと共に配信パッケージ化し、端末13Cに配信してもよい。 In the present embodiment, if they do not match (determination in S22 is No), the process ends as abnormal (S23), but the present invention is not limited to this. For example, a virtual machine that matches the source code file acquired by the source code acquisition unit 102 may be packaged for distribution together with the source code file, and distributed to the terminal 13C.

バージョンチェックが完了したならば、コード変換部103は、Java言語が用いられたソースコードファイルをコンパイルし、バイトコードを生成する。 When the version check is completed, the code conversion unit 103 compiles the source code file using the Java language and generates bytecode.

(プログラム配信サーバと端末とのデータトランザクション)
図7は、第1の実施形態に係るプログラム配信サーバ11と端末13との間のデータトランザクションを示すシーケンス図である。図7に示すように、まず、プログラム配信サーバ11(図2参照)のアーキティクチャ情報取得部101が、端末13へ「接続要求」を送信する(S101)。端末13は、アプリケーションプログラムを受入れ可能としたときに、レスポンス「OK」をプログラム配信サーバ11へ返信する(S102)。ここで、受け入れ可能とは、通信をプログラム配信だけに使用し、他になにも通信していない状態をいう。例えば、端末13において、プログラム配信に関係がないアプリケーションが通信をしていない状態を含む。
(Data transaction between program distribution server and terminal)
FIG. 7 is a sequence diagram showing a data transaction between the program distribution server 11 and the terminal 13 according to the first embodiment. As shown in FIG. 7, first, the architecture information acquisition unit 101 of the program distribution server 11 (see FIG. 2) transmits a "connection request" to the terminal 13 (S101). When the terminal 13 makes the application program acceptable, it returns a response "OK" to the program distribution server 11 (S102). Here, "acceptable" refers to a state in which communication is used only for program distribution and nothing else is communicated. For example, this includes a state in which an application unrelated to program distribution is not communicating on the terminal 13.

次に、端末13は、記憶部(不図示)に記憶する「アーキティクチャ情報」を、プログラム配信サーバ11へ送信する(S103)。これに対し、プログラム配信サーバ11のアーキティクチャ情報取得部101は、アーキティクチャ情報の受信が完了すると、端末13にレスポンス「OK」を送信する(S104)。また、プログラム配信サーバ11は、アーキティクチャ情報を受信できなかった場合や、不明な応答を受け取った場合は、タイムアウトで異常終了する。 Next, the terminal 13 transmits "architecture information" stored in a storage unit (not shown) to the program distribution server 11 (S103). In response, upon completion of receiving the architecture information, the architecture information acquisition unit 101 of the program distribution server 11 transmits a response "OK" to the terminal 13 (S104). Furthermore, if the program distribution server 11 fails to receive the architecture information or receives an unknown response, it times out and abnormally terminates.

次に、プログラム配信サーバ11の配信部104は、端末13に対し、パッケージ配信を行う(S105)。端末13は、パッケージを受信してプログラムの書換えを完了すると、レスポンス「OK」を返信する(S106)。プログラムの書換えとは、プログラムの配信を受けた端末13が、パッケージを読み解き、チェックコードにより正しく受信できたかをチェックし、機器の記憶部(例えば、ROM)に新しいアプリケーションを記録することをいう。 Next, the distribution unit 104 of the program distribution server 11 distributes the package to the terminal 13 (S105). When the terminal 13 receives the package and completes rewriting the program, it returns a response "OK" (S106). Rewriting a program means that the terminal 13 that has received the program reads the package, checks whether the program was correctly received using a check code, and records a new application in the storage unit (for example, ROM) of the device.

次に、プログラム配信サーバ11の配信部104は、配信したアプリケーションプログラムを起動するために、「アプリ起動」を端末13へ送信する(S107)。端末13は、アプリケーションプログラムを正常に起動したならば、レスポンス「OK」を返信する(S108)。 Next, the distribution unit 104 of the program distribution server 11 transmits "app launch" to the terminal 13 in order to launch the distributed application program (S107). If the terminal 13 has successfully started the application program, it returns a response of "OK" (S108).

図7を参照して説明したプログラム配信サーバ11と端末13との間のデータトランザクションは一例に過ぎず、順番等を適宜変更することができる。 The data transaction between the program distribution server 11 and the terminal 13 described with reference to FIG. 7 is only an example, and the order etc. can be changed as appropriate.

(サーバの構成)
次に、図8を参照して、プログラム配信サーバ11(図2参照)、プログラム管理サーバ14のようなサーバ(以下、単に「サーバ」と記載する)を実現するためのコンピュータ装置のハードウェア構成について説明する。図8は、第1の実施形態に係るサーバを実現するためのコンピュータ装置のハードウェア構成を示すブロック図である。
(Server configuration)
Next, with reference to FIG. 8, the hardware configuration of a computer device for realizing servers (hereinafter simply referred to as "servers") such as the program distribution server 11 (see FIG. 2) and the program management server 14. I will explain about it. FIG. 8 is a block diagram showing the hardware configuration of a computer device for realizing the server according to the first embodiment.

第1の実施形態の説明に用いた図2は、機能単位のブロックを示している。これらの機能ブロック(構成部)は、ハードウェア及び/又はソフトウェアの任意の組み合わせによって実現される。また、各機能ブロックの実現手段は特に限定されない。すなわち、各機能ブロックは、物理的に結合した1つの装置により実現されてもよいし、物理的に分離した2つ以上の装置を有線又は無線で接続し、これら複数の装置により実現されてもよい。 FIG. 2 used to explain the first embodiment shows functional unit blocks. These functional blocks (components) are realized by any combination of hardware and/or software. Further, the means for realizing each functional block is not particularly limited. That is, each functional block may be realized by one physically coupled device, or may be realized by two or more physically separated devices connected by wire or wirelessly. good.

例えば、第1の実施形態におけるサーバは、本発明のプログラム配信方法の各工程を実施するコンピュータとして機能してもよい。図8に示すサーバ1000は、物理的には、プロセッサ1001、メモリ1002、ストレージ1003、通信装置1004、入力装置1005、出力装置1006、バス1008などを含むコンピュータ装置として構成されてもよい。 For example, the server in the first embodiment may function as a computer that implements each step of the program distribution method of the present invention. The server 1000 shown in FIG. 8 may be physically configured as a computer device including a processor 1001, a memory 1002, a storage 1003, a communication device 1004, an input device 1005, an output device 1006, a bus 1008, and the like.

なお、以下の説明では、「装置」という文言は、回路、デバイス、ユニットなどに読み替えることができる。サーバ1000などのハードウェア構成は、図に示した各装置を1つ又は複数含むように構成されてもよいし、一部の装置を含まずに構成されてもよい。 In addition, in the following description, the word "apparatus" can be read as a circuit, a device, a unit, etc. The hardware configuration of the server 1000 and the like may be configured to include one or more of the devices shown in the figure, or may be configured to not include some of the devices.

例えば、プロセッサ1001は1つだけ図示されているが、複数のプロセッサがあってもよい。また、処理は、1のプロセッサで実行されてもよいし、処理が同時に、逐次に、又はその他の手法で、1以上のプロセッサで実行されてもよい。 For example, although only one processor 1001 is shown, there may be multiple processors. Also, the processing may be performed on one processor, or the processing may be performed on one or more processors simultaneously, sequentially, or in some other manner.

プログラム配信サーバ11、プログラム管理サーバ14などにおける各機能は、プロセッサ1001、メモリ1002などのハードウェア上に所定のソフトウェア(プログラム)を読み込ませることで、プロセッサ1001が演算を行い、通信装置1004による通信や、メモリ1002及びストレージ1003におけるデータの読み出し及び/又は書き込みを制御することで実現される。 Each function in the program distribution server 11, program management server 14, etc. is performed by loading predetermined software (programs) onto hardware such as the processor 1001 and memory 1002, so that the processor 1001 performs calculations and the communication device 1004 performs communication. This is realized by controlling reading and/or writing of data in the memory 1002 and storage 1003.

プロセッサ1001は、例えば、オペレーティングシステムを動作させてコンピュータ全体を制御する。プロセッサ1001は、周辺装置とのインターフェース、制御装置、演算装置、レジスタなどを含む中央処理装置(CPU:Central Processing Unit)で構成されてもよい。なお、上述のアーキティクチャ情報取得部101、ソースコード取得部102、コード変換部103及び配信部104などの各部は、プロセッサ1001で実現されてもよい。プロセッサ1001は、1以上のチップで実装されてもよい。 The processor 1001, for example, operates an operating system to control the entire computer. The processor 1001 may be configured with a central processing unit (CPU) that includes interfaces with peripheral devices, a control device, an arithmetic device, registers, and the like. Note that each unit such as the above-mentioned architecture information acquisition unit 101, source code acquisition unit 102, code conversion unit 103, and distribution unit 104 may be implemented by the processor 1001. Processor 1001 may be implemented with one or more chips.

また、プロセッサ1001は、プログラム(プログラムコード)、ソフトウェアモジュールやデータを、ストレージ1003及び/又は通信装置1004からメモリ1002に読み出し、これらに従って各種の処理を実行する。プログラムとしては、上述の実施形態で説明した動作の少なくとも一部をコンピュータに実行させるプログラムが用いられる。例えば、アーキティクチャ情報取得部101、ソースコード取得部102、コード変換部103及び配信部104は、メモリ1002に格納され、プロセッサ1001で動作する制御プログラムによって実現されてもよく、他の機能ブロックについても同様に実現されてもよい。 Further, the processor 1001 reads programs (program codes), software modules, and data from the storage 1003 and/or the communication device 1004 to the memory 1002, and executes various processes in accordance with these. As the program, a program that causes a computer to execute at least part of the operations described in the above embodiments is used. For example, the architecture information acquisition unit 101, the source code acquisition unit 102, the code conversion unit 103, and the distribution unit 104 may be realized by a control program that is stored in the memory 1002 and runs on the processor 1001, and other functional blocks may also be realized in the same way.

メモリ1002は、コンピュータ読み取り可能な記録媒体であり、例えば、ROM(Read Only Memory)、EPROM(Erasable Programmable ROM)、EEPROM(Electrically EPROM)、RAM(Random Access Memory)、その他の適切な記憶媒体の少なくとも1つで構成されてもよい。メモリ1002は、レジスタ、キャッシュ、メインメモリ(主記憶装置)などと呼ばれてもよい。メモリ1002は、本発明の一実施形態に係るプログラム配信方法を実施するために実行可能なプログラム(プログラムコード)、ソフトウェアモジュールなどを保存することができる。 The memory 1002 is a computer-readable recording medium, and includes at least one of ROM (Read Only Memory), EPROM (Erasable Programmable ROM), EEPROM (Electrical EPROM), RAM (Random Access Memory), and other suitable storage media. It may be composed of one. Memory 1002 may be called a register, cache, main memory, or the like. The memory 1002 can store executable programs (program codes), software modules, and the like to implement the program distribution method according to an embodiment of the present invention.

ストレージ1003は、コンピュータ読み取り可能な記録媒体であり、例えば、フレキシブルディスク、フロッピー(登録商標)ディスク、光磁気ディスク(例えば、コンパクトディスク(CD-ROM(Compact Disc ROM)など)、デジタル多用途ディスク、Blu-ray(登録商標)ディスク)、リムーバブルディスク、ハードディスクドライブ、スマートカード、フラッシュメモリデバイス(例えば、カード、スティック、キードライブ)、磁気ストライプ、データベース、サーバ、その他の適切な記憶媒体の少なくとも1つで構成されてもよい。ストレージ1003は、補助記憶装置と呼ばれてもよい。 The storage 1003 is a computer-readable recording medium, such as a flexible disk, a floppy (registered trademark) disk, a magneto-optical disk (for example, a compact disk (CD-ROM), etc.), a digital versatile disk, removable disk, hard disk drive, smart card, flash memory device (e.g., card, stick, key drive), magnetic stripe, database, server, or other suitable storage medium. It may be composed of. Storage 1003 may also be called an auxiliary storage device.

通信装置1004は、有線及び/又は無線ネットワークを介してコンピュータ間の通信を行うためのハードウェア(送受信デバイス)であり、例えばネットワークデバイス、ネットワークコントローラ、ネットワークカード、通信モジュールなどともいう。 The communication device 1004 is hardware (transmission/reception device) for communicating between computers via a wired and/or wireless network, and is also referred to as, for example, a network device, network controller, network card, communication module, or the like.

入力装置1005は、外部からの入力を受け付ける入力デバイス(例えば、キーボード、マウスなど)である。出力装置1006は、外部への出力を実施する出力デバイス(例えば、ディスプレイ、スピーカーなど)である。なお、入力装置1005及び出力装置1006は、一体となった構成(例えば、タッチパネル)であってもよい。サーバ1000は、入力装置1005及び出力装置1006を備えていてなくてもよい。 The input device 1005 is an input device (eg, keyboard, mouse, etc.) that accepts input from the outside. The output device 1006 is an output device (eg, a display, a speaker, etc.) that performs output to the outside. Note that the input device 1005 and the output device 1006 may have an integrated configuration (for example, a touch panel). The server 1000 does not need to include the input device 1005 and the output device 1006.

また、プロセッサ1001やメモリ1002などの各装置は、情報を通信するためのバス1008で接続される。バス1008は、単一のバスで構成されてもよいし、装置間で異なるバスで構成されてもよい。 Furthermore, each device such as the processor 1001 and the memory 1002 is connected by a bus 1008 for communicating information. Bus 1008 may be configured as a single bus or may be configured as different buses between devices.

また、サーバ1000は、マイクロプロセッサ、デジタル信号プロセッサ(DSP:Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)、PLD(Programmable Logic Device)、FPGA(Field Programmable Gate Array)などのハードウェアを含んで構成されてもよく、当該ハードウェアにより、各機能ブロックの一部又は全てが実現されてもよい。例えば、プロセッサ1001は、これらのハードウェアの少なくとも1つで実装されてもよい。 The server 1000 also includes hardware such as a microprocessor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a programmable logic device (PLD), and a field programmable gate array (FPGA). A part or all of each functional block may be realized by the hardware. For example, processor 1001 may be implemented with at least one of these hardware.

なお、上述のようなハードウェア構成からなるコンピュータ装置により、端末13(図2参照)を実現することもできる。 Note that the terminal 13 (see FIG. 2) can also be realized by a computer device having the above-described hardware configuration.

以上説明したように、上記第1の実施形態によれば、一つのアプリケーションプログラムに対し、異なるプログラミング言語を用いたソースコードファイルをプログラム管理サーバ14(図2参照)に用意し、プログラム配信サーバ11は、端末13から取得したアーキテクィチャ情報に含まれる開発言語(使用言語情報)に基づいてソースコードファイルを取得し、開発言語に適合するように、実行可能形式ファイルに変換し、又は、ソースコードファイルのままで、端末13に配信する。これにより、端末13の機能及び性能を落とすことなく、実行環境が異なる端末に同一のプログラムを提供できるという効果を発揮する。 As explained above, according to the first embodiment, source code files using different programming languages are prepared for one application program in the program management server 14 (see FIG. 2), and the program distribution server 11 acquires a source code file based on the development language (language information used) included in the architecture information acquired from the terminal 13, converts it into an executable file to match the development language, or The code file is delivered to the terminal 13 as it is. This brings about the effect that the same program can be provided to terminals with different execution environments without degrading the functionality and performance of the terminal 13.

<第2の実施形態>
図9~図14を参照して、第2の実施形態に係る、検証処理を含むプログラム配信システムについて説明する。以下の説明では、第1の実施形態と相違する点について説明し、同じ点については説明を省略する。また、図1~図8に用いた符号は、同一の構成又は工程については同一の符号を付して説明を省略する。
<Second embodiment>
A program distribution system including verification processing according to the second embodiment will be described with reference to FIGS. 9 to 14. In the following description, points that are different from the first embodiment will be explained, and descriptions of the same points will be omitted. Further, the same reference numerals used in FIGS. 1 to 8 refer to the same structures or steps, and the explanation thereof will be omitted.

第1の実施形態に係るプログラム配信システム1では、図7に示すように、プログラム配信サーバ11から端末13(図2参照)にアプリケーションプログラムを配信した後、端末13にアプリケーションプログラムを起動させ、それが成功したことを示すレスポンス「OK」を受信したことにより、アプリケーションプログラムの検証を行なっている。このため、端末13でのアプリケーションプログラムの検証により、端末13にインストール済みで且つ起動中の他のアプリケーションプログラムとの干渉により、アプリケーションプログラムが起動できなくなるような事象があれば、プログラム配信サーバ11側で異常終了として検知することができる。しかし、端末13でのアプリケーションプログラムの検証は、端末13を異常停止させたり、再起動が必要になったり等の不都合を招くことが懸念される。 In the program distribution system 1 according to the first embodiment, as shown in FIG. 7, after distributing an application program from the program distribution server 11 to the terminal 13 (see FIG. 2), the application program is started on the terminal 13, and then Upon receiving the response "OK" indicating that the application was successful, the application program is being verified. Therefore, when verifying the application program on the terminal 13, if there is an event where the application program cannot be started due to interference with other application programs installed on the terminal 13 and running, the program distribution server 11 side It can be detected as an abnormal termination. However, there is a concern that verifying the application program on the terminal 13 may cause inconveniences such as causing the terminal 13 to stop abnormally or requiring restarting.

そこで、第2の実施形態では、アプリケーションプログラムの配信前に、プログラム配信サーバにおいて、端末13の実行環境と同等の評価環境を構築し、アプリケーションプログラムの検証を行なっている。 Therefore, in the second embodiment, before distributing the application program, an evaluation environment equivalent to the execution environment of the terminal 13 is constructed in the program distribution server, and the application program is verified.

<アプリケーション検証処理>
図9は、第2の実施形態に係るプログラム配信サーバを示す機能ブロック図である。図9に示すように、プログラム配信サーバ201は、検証環境構築部202及び検証部203をさらに具備する。
<Application verification process>
FIG. 9 is a functional block diagram showing a program distribution server according to the second embodiment. As shown in FIG. 9, the program distribution server 201 further includes a verification environment construction section 202 and a verification section 203.

図10は、第2の実施形態に係るプログラム配信サーバ201が行うアプリケーション検証処理の各工程を示すフローチャートである。プログラム配信サーバ201(図9参照)は、図5~図7を参照して説明した第1の実施形態に係るプログラム配信サーバ11と同様の処理を行う。しかし、パッケージを配信する(図5中、S6参照)前に、端末13のアーキティクチャ情報に基づいてアプリケーションプログラムの検証環境下での検証(以下、「アプリケーション検証処理」と記載する)を行う点で相違する。 FIG. 10 is a flowchart showing each step of the application verification process performed by the program distribution server 201 according to the second embodiment. The program distribution server 201 (see FIG. 9) performs the same processing as the program distribution server 11 according to the first embodiment described with reference to FIGS. 5 to 7. However, before distributing the package (see S6 in FIG. 5), the application program is verified in a verification environment (hereinafter referred to as "application verification processing") based on the architecture information of the terminal 13. They differ in some respects.

(検証環境構築処理)
図10に示すように、まず、検証環境構築部202が検証環境構築処理を実施する(S61)。検証環境構築処理(S61)では、プログラム配信サーバ201上に、アーキティクチャ情報に基づいて、端末13(図9参照)と同等の実行環境である検証環境を仮想的に構築する。
(Verification environment construction process)
As shown in FIG. 10, first, the verification environment construction unit 202 executes verification environment construction processing (S61). In the verification environment construction process (S61), a verification environment that is an execution environment equivalent to the terminal 13 (see FIG. 9) is virtually constructed on the program distribution server 201 based on the architecture information.

図11は、第2の実施形態に係るプログラム配信サーバ201における検証環境構築処理の各工程を示すフローチャートである。図11に示すように、端末13(図9参照)のうち、評価対象の端末(以下、対象端末と記載する)について、事前に取得しているアーキティクチャ情報を解析し(S81)、対象端末と同等の検証環境が構築可能か否かを判定する(S82)。 FIG. 11 is a flowchart showing each step of the verification environment construction process in the program distribution server 201 according to the second embodiment. As shown in FIG. 11, among the terminals 13 (see FIG. 9), the architecture information obtained in advance for the terminal to be evaluated (hereinafter referred to as the target terminal) is analyzed (S81), and the It is determined whether a verification environment equivalent to the terminal can be constructed (S82).

S82の判定方法は、特に限定されないが、対象端末のアーキティクチャ情報に示された環境を構築できない場合に構築不可と判定し、そうでない場合に構築可能と判断することができる。具体的には、例えば、コンパイラのライセンス期限切れにより、再コンパイルがかけられない場合、及び、開発言語におけるバージョンの差異(例:Java、Pythonのバージョン違い)がある場合が挙げられるが、特に限定されない。 The determination method in S82 is not particularly limited, but if the environment indicated in the architecture information of the target terminal cannot be constructed, it can be determined that the environment cannot be constructed, and if not, it can be determined that the environment can be constructed. Specifically, examples include, but are not limited to, cases in which recompilation cannot be performed because the compiler license has expired, and cases in which there are differences in versions of development languages (e.g., differences in versions of Java and Python). .

S82において判定がNoであれば、異常として終了する(S83)。S82において判定がYesであれば、検証環境を構築する(S84)。検証環境の構築は、具体的には、以下のようにして行うことができる。 If the determination is No in S82, the process ends as abnormal (S83). If the determination is Yes in S82, a verification environment is constructed (S84). Specifically, the verification environment can be constructed as follows.

検証環境の構築は、仮想化技術(コンテナ型仮想化技術等)、バッチ処理による自動化環境を用いることで実現できる。対象端末のアーキティクチャ情報を基に、プログラム配信サーバ201に格納されているCPUアーキティクチャ(x86、ARM等)、OS(Debian、Ubuntu、CentOS等)、開発言語(Java、Python等)などの仮想環境を構築するためのイメージを取得し、各イメージを基に、対象端末と同様の検証環境を自動構築する。 The verification environment can be constructed using virtualization technology (container-based virtualization technology, etc.) and an automated environment using batch processing. Based on the architecture information of the target terminal, the CPU architecture (x86, ARM, etc.), OS (Debian, Ubuntu, CentOS, etc.), development language (Java, Python, etc.) stored in the program distribution server 201, etc. The system acquires images for building a virtual environment, and automatically builds a verification environment similar to the target terminal based on each image.

検証環境の構築を行った後、構築ができたか否かを判定する(S85)。S85における判定がNoであれば、異常として終了する(S86)。一方、S85における判定がYesであれば、図10に示すS62に進む。 After constructing the verification environment, it is determined whether the construction has been completed (S85). If the determination in S85 is No, the process ends as abnormal (S86). On the other hand, if the determination in S85 is Yes, the process advances to S62 shown in FIG.

S62では、検証部203は、関連アプリケーション(図10中、「関連アプリ」と記載する)がプログラム管理サーバ14から取得可能か否か判定する。 In S62, the verification unit 203 determines whether the related application (described as “related application” in FIG. 10) can be obtained from the program management server 14.

(関連アプリケーション)
関連アプリケーションとは、配信対象のアプリケーションプログラム(以下、対象アプリケーションという)が複数のアプリケーションで構成されるアプリケーション群の一部であった場合、同アプリケーション群を構成するその他のアプリケーションプログラムをいう。
(Related applications)
When the application program to be distributed (hereinafter referred to as the target application) is part of an application group made up of multiple applications, the related application refers to other application programs that make up the same application group.

図12は、第2の実施形態における対象アプリケーションと関連アプリケーションとの関係を示す模式図である。図12中、「加工アプリケーション」を「加工アプリ」、「分析アプリケーション」を「分析アプリ」と記載する。具体的には、図12に示すように、対象端末において、あるデータ(加工データ)を加工する「加工アプリケーション」と、分析する「分析アプリケーション」が存在すると想定する。さらに、「加工アプリケーション」と「分析アプリケーション」はデータフォーマットを共有していると想定する。「分析アプリケーション」は、共有されたデータフォーマットを基に加工データの分析処理を実行するため、「加工アプリケーション」との依存性が発生する。また、「加工アプリケーション」は加工データを「分析アプリケーション」に送信後、「分析アプリケーション」から受信完了の応答を受け取る。 FIG. 12 is a schematic diagram showing the relationship between the target application and related applications in the second embodiment. In FIG. 12, "processing application" is described as "processing application" and "analysis application" is described as "analysis application." Specifically, as shown in FIG. 12, it is assumed that a target terminal has a "processing application" that processes certain data (processed data) and an "analysis application" that analyzes it. Furthermore, it is assumed that the "processing application" and the "analysis application" share a data format. Since the "analysis application" executes analysis processing of processed data based on the shared data format, there is a dependency with the "processing application". Further, after transmitting the processed data to the "analysis application", the "processing application" receives a reception completion response from the "analysis application".

このように、依存関係にある2つのアプリケーションのうち、一方を対象アプリケーションと、他方を関連アプリケーションと定義する。 In this way, among the two applications that have a dependent relationship, one is defined as the target application and the other as the related application.

S62での判定は、例えば、対象端末のアーキティクチャ情報内の、本発明の実行環境情報の一例であるインストールアプリケーション情報を用いて関連アプリケーションのソースコードファイルをプログラム管理サーバ14のデータベースから検索し、検索結果が得られたか否かで行うことができる。 The determination in S62 is made by, for example, searching the database of the program management server 14 for the source code file of the related application using the installed application information, which is an example of the execution environment information of the present invention, in the architecture information of the target terminal. This can be done depending on whether or not a search result is obtained.

S62において判定がNoであった場合、異常として終了する(S63)。S62において判定がYesであった場合、ソースコード取得部102(図9参照)は、関連アプリケーションのソースコードファイルをプログラム管理サーバ14から取得する(S64)。 If the determination is No in S62, the process ends as an abnormality (S63). If the determination is Yes in S62, the source code acquisition unit 102 (see FIG. 9) acquires the source code file of the related application from the program management server 14 (S64).

次に、コード変換部103(図9参照)は、関連アプリケーションのソースコードファイルに対し、第1の実施形態と同様に、コード変換処理を実施する(S65)。その後、コード変換処理が正常終了したか否かを判定する(S66)。 Next, the code conversion unit 103 (see FIG. 9) performs code conversion processing on the source code file of the related application, as in the first embodiment (S65). Thereafter, it is determined whether the code conversion process has ended normally (S66).

S66において判定がNoであった場合、異常として終了する(S67)。S66において判定がYesであった場合、検証部203(図9参照)は、関連アプリケーションを検証環境へデプロイする(S68)。ここでデプロイとは、関連アプリケーションを、検証環境上で実行可能な状態に配置することをいう。 If the determination is No in S66, the process ends as abnormal (S67). If the determination is Yes in S66, the verification unit 203 (see FIG. 9) deploys the related application to the verification environment (S68). Deployment here means placing the related application in an executable state on the verification environment.

(検証処理)
次いで、検証部203は、検証処理を実施する(S69)。図13は、第2の実施形態に係るプログラム配信サーバ201における検証処理の各工程を示すフローチャートである。図13に示すように、まず、検証部203(図9参照)は、対象アプリケーションの単体検証を実施する(S91)。
(Verification process)
Next, the verification unit 203 performs verification processing (S69). FIG. 13 is a flowchart showing each step of the verification process in the program distribution server 201 according to the second embodiment. As shown in FIG. 13, first, the verification unit 203 (see FIG. 9) performs unit verification of the target application (S91).

単体検証は、具体的には、対象アプリケーション単体での配信予定端末との適合性(CPUアーキティクチャ、OS、開発言語等)の確認を実施する。より具体的には、検証環境構築処理で構築した対象端末と同様の実行環境(CPUアーキティクチャ、OS、開発言語、等)において、対象アプリケーションの実行、実行結果のログ解析を実施する。この出力ログが、プログラム配信サーバ201にてあらかじめ定義されている正常値と一致すれば正常応答と判断する。また、異常の場合にはエラーコードを出力し、プログラム配信サーバ201にあらかじめ定義されているエラーコード表と照らし合わせることで不適合となる原因(CPUアーキティクチャ、OS、開発言語等)を配信前に確認することが可能となる。これにより、配信予定の対象アプリケーションが対象端末の実行環境と同等の環境下で実行可能であることが確認できる。 Specifically, the unit verification checks the compatibility (CPU architecture, OS, development language, etc.) of the target application alone with the terminal to be distributed. More specifically, the target application is executed and log analysis of the execution results is performed in the same execution environment (CPU architecture, OS, development language, etc.) as the target terminal constructed in the verification environment construction process. If this output log matches a normal value predefined in the program distribution server 201, it is determined that the response is normal. In addition, in the case of an abnormality, the error code is output and compared with the error code table predefined in the program distribution server 201 to determine the cause of the nonconformity (CPU architecture, OS, development language, etc.) before distribution. It is possible to check. This makes it possible to confirm that the target application to be distributed can be executed in an environment equivalent to the execution environment of the target terminal.

次に、対象アプリケーションの単体検証の結果が正常か否かを判定する(S92)。S92における判定がNoである場合、異常であり、エラー出力を行い、処理を終了する(S93)。S92における判定がYesである場合、正常であり、次の接続検証(S94)を行う。 Next, it is determined whether the result of the unit verification of the target application is normal (S92). If the determination in S92 is No, it is abnormal, an error is output, and the process ends (S93). If the determination in S92 is Yes, it is normal and the next connection verification (S94) is performed.

(接続検証)
接続検証(S94)では、対象アプリケーションと関連アプリケーションとを接続させ、アプリケーション間の検証を実施する。
(Connection verification)
In connection verification (S94), the target application and related applications are connected and verification between the applications is performed.

上述のように、対象アプリケーションと関連アプリケーションとは依存性が存在する。接続検証では、その依存する項目において、不一致等の異常がある場合、異常の判定となる。 As described above, there is a dependency between the target application and related applications. In connection verification, if there is an abnormality, such as a mismatch, in the dependent item, it is determined to be abnormal.

具体的には、アプリケーション間における接続・通信におけるプロトコル又は設定の違いなどが挙げられる。 Specifically, this includes differences in protocols or settings in connection/communication between applications.

図14は、第2の実施形態における対象アプリケーションと関連アプリケーションとの接続における正常及び異常を示す模式図である。図14を参照して、対象アプリケーションを「加工アプリケーション」、関連アプリケーションを「分析アプリケーション」として具体例を説明する。アプリケーション間にて通信を行う場合、同じ通信プロトコルの使用、アプリケーション同士で通信設定(例:port番号等)の相互認識が必要となる。また、「加工アプリケーション」及び「分析アプリケーション」で共有しているデータフォーマットに準じていない場合等においても検証時異常(NG)となる。「加工アプリケーション」及び「分析アプリケーション」間の接続検証時における判定は、図14に示す通り、例えば、通信プロトコル(HTTPとMQTT)の一致又は不一致、データフォーマット(text、JSON)の一致又は不一致に基づいて行うことができる。 FIG. 14 is a schematic diagram showing normal and abnormal connections between the target application and related applications in the second embodiment. A specific example will be described with reference to FIG. 14, assuming that the target application is a "processing application" and the related application is an "analysis application." When communicating between applications, it is necessary to use the same communication protocol and to mutually recognize communication settings (eg, port numbers, etc.) between the applications. Additionally, an error (NG) will occur during verification if the data format does not conform to the data format shared by the "processing application" and the "analysis application". As shown in Figure 14, the determination made when verifying the connection between the "processing application" and the "analysis application" is, for example, whether the communication protocols (HTTP and MQTT) match or do not match, and the data formats (text, JSON) match or do not match. It can be done based on

次に、接続検証の結果が正常か否かを判定する(S95)。S95における判定がNoである場合、異常であり、エラー出力を行い、処理を終了する(S96)。S95における判定がYesである場合、正常であり、検証処理を終了し、図10のS70に進む。 Next, it is determined whether the connection verification result is normal or not (S95). If the determination in S95 is No, it is abnormal, an error is output, and the process ends (S96). If the determination in S95 is Yes, it is normal, the verification process ends, and the process proceeds to S70 in FIG. 10.

S70では、検証処理の結果が正常か否かを判定する。S70における判定がNoである場合、異常として処理を終了する(S71)。S70における判定がYesである場合、正常であり、アプリケーション検証処理を終了し、対象端末へのパッケージの配信を行う(図5中、S6)。 In S70, it is determined whether the result of the verification process is normal. If the determination in S70 is No, it is determined that there is an abnormality and the process ends (S71). If the determination in S70 is Yes, it is normal, the application verification process is ended, and the package is distributed to the target terminal (S6 in FIG. 5).

本実施の形態では、対象端末でのアプリケーションプログラムの起動による検証は必要ないが実施しても構わない。 In this embodiment, verification by starting an application program on the target terminal is not necessary, but may be performed.

以上説明したように、上記第2の実施形態によれば、第1の実施形態の同様の効果に加えて、対象端末の実行環境情報(例えば、インストールアプリケーション情報)に基づいて、対象端末の実行環境と同等の検証環境を構築し、検証環境上でのソースコード又は実行可能形式ファイルを実行し、プログラムの検証を行う。これにより、対象端末で使用されるアプリケーションプログラムの管理、検証及び配信をプログラム配信サーバ201で行い、アプリケーションプログラムの開発及びデプロイを短期に、且つ、適切に行うことが可能になる。また、対象端末の実行環境に適合したアプリケーションプログラムを配信前に実行環境とバイナリレベルまで同等の検証環境下で検証を行った上で配信することが可能となるため、品質高いアプリケーションプログラムを提供することができ、対象端末はアプリケーション実行時間及び機能を落とさず、アプリケーションプログラムの実行が可能となる等の効果を奏する。 As explained above, according to the second embodiment, in addition to the same effects as the first embodiment, execution of the target terminal is performed based on the execution environment information (for example, installed application information) of the target terminal. A verification environment equivalent to the environment is constructed, the source code or executable file is executed on the verification environment, and the program is verified. This allows the program distribution server 201 to manage, verify, and distribute application programs used in target terminals, and to develop and deploy application programs appropriately in a short period of time. In addition, it is possible to deliver application programs that are compatible with the execution environment of the target terminal after being verified in a verification environment that is equivalent to the execution environment, down to the binary level, before distribution, making it possible to provide high-quality application programs. This has the effect that the target terminal can execute the application program without degrading the application execution time or function.

なお、本発明は上記実施形態に限定されず、種々変更して実施することが可能である。上記実施の形態において、添付図面に図示されている構成要素の大きさや形状、機能などについては、これに限定されず、本発明の効果を発揮する範囲内で適宜変更することが可能である。その他、本発明の目的の範囲を逸脱しない限りにおいて適宜変更して実施することが可能である。 Note that the present invention is not limited to the above embodiments, and can be implemented with various modifications. In the embodiments described above, the sizes, shapes, functions, etc. of the constituent elements illustrated in the accompanying drawings are not limited to these, and can be changed as appropriate within the scope of achieving the effects of the present invention. Other changes can be made as appropriate without departing from the scope of the invention.

例えば、上記第1、第2の実施形態では、アプリケーションプログラム(パッケージ)の配信は、プログラム配信サーバ11、201(図2、図9参照)からの要求により行っているが、端末13からの要求により行われてもよい。 For example, in the first and second embodiments described above, application programs (packages) are distributed based on requests from the program distribution servers 11 and 201 (see FIGS. 2 and 9); It may be performed by

また、上記第1、第2の実施形態では、ソースコードファイルはプログラム管理サーバ14のデータベースにより管理されているが、プログラム配信サーバ11、201(図2、図9参照)がデータベースを、例えば、ストレージ1003(図8参照)に備え、プログラム管理サーバ14と同様にソースコードファイルを管理させてもよい。すなわち、本発明の管理部は、プログラム配信サーバ11、201(図2、図9参照)が備えていてもよい。 Further, in the first and second embodiments described above, the source code files are managed by the database of the program management server 14, but the program distribution servers 11 and 201 (see FIGS. 2 and 9) manage the database, for example. In preparation for the storage 1003 (see FIG. 8), source code files may be managed in the same manner as the program management server 14. That is, the management unit of the present invention may be included in the program distribution servers 11 and 201 (see FIGS. 2 and 9).

また、上記第2の実施形態では、ソースコード取得部(図2、図9参照)がソースコードファイルを取得してから、ソースコードファイルのバージョンチェックを行っているが、ソースコードファイルを取得する前に、プログラム管理サーバ14から適合するインタプリタ又は仮想マシンに関する情報を取得し、バージョンチェックを行なってもよい。 Furthermore, in the second embodiment described above, the source code acquisition unit (see FIGS. 2 and 9) performs a version check of the source code file after acquiring the source code file. Beforehand, information regarding a compatible interpreter or virtual machine may be obtained from the program management server 14 and a version check may be performed.

本発明は、端末の機能及び性能を落とすことなく、実行環境が異なる端末に同一のプログラムを提供できるという効果を奏し、例えば、アプリケーションプログラムの配信及び検証のためのシステムに適用して好適である。 INDUSTRIAL APPLICABILITY The present invention has the effect that the same program can be provided to terminals with different execution environments without degrading the functions and performance of the terminals, and is suitable for application to, for example, a system for distributing and verifying application programs. .

1 プログラム配信システム
11、201 プログラム配信サーバ(プログラム配信装置)
12 ネットワーク
13(13a~13c、13n、13A~13C) 端末
14 プログラム管理サーバ(管理部)
23 アーキティクチャ情報
26 インタプリタ
28 Java VM(仮想マシン)
101 アーキティクチャ情報取得部
102 ソースコード取得部(取得部)
103 コード変換部(変換部)
104 配信部(送信部)
202 検証環境構築部
203 検証部
1000 サーバ
1001 プロセッサ
1002 メモリ
1003 ストレージ
1004 通信装置
1005 入力装置
1006 出力装置
1008 バス
1 Program distribution system 11, 201 Program distribution server (program distribution device)
12 Network 13 (13a to 13c, 13n, 13A to 13C) Terminal 14 Program management server (management department)
23 Architecture information 26 Interpreter 28 Java VM (virtual machine)
101 Architecture information acquisition unit 102 Source code acquisition unit (acquisition unit)
103 Code conversion section (conversion section)
104 Distribution section (transmission section)
202 Verification environment construction unit 203 Verification unit 1000 Server 1001 Processor 1002 Memory 1003 Storage 1004 Communication device 1005 Input device 1006 Output device 1008 Bus

Claims (4)

一つのプログラムに対し、異なるプログラミング言語を用いたソースコードを管理する管理部から、端末の使用言語情報に基づき、前記端末の実行環境で実行可能な使用プログラミング言語を特定し、前記使用プログラミング言語を用いた前記ソースコードを前記管理部から取得するソースコード取得部と、
前記使用プログラミング言語がコンパイル言語である場合、前記ソースコードを前記実行環境で実行可能な実行可能形式ファイルに変換する変換部と、
前記使用プログラミング言語がスクリプト言語である場合は前記ソースコードを、前記使用プログラミング言語が前記コンパイル言語である場合は前記実行可能形式ファイルを、前記端末に送信する送信部と、
前記端末の実行環境情報に基づいて、前記端末の前記実行環境と同等の検証環境を構築する検証環境構築部と、
前記検証環境上での前記ソースコード又は前記実行可能形式ファイルを実行し、アプリケーションプログラムの配信前に前記プログラムの検証を行う検証部と、
を具備し、
前記ソースコード取得部は、前記ソースコードの取得の要否を、アーキティクチャ情報に含まれるインストールアプリケーション情報にインストールされていないアプリケーションプログラムの情報があったか否かに基づいて判定することを特徴とするプログラム配信装置。
A management unit that manages source codes using different programming languages for one program identifies a programming language that can be executed in the execution environment of the terminal based on the language information of the terminal, and selects the programming language that can be executed in the execution environment of the terminal. a source code acquisition unit that acquires the used source code from the management unit;
If the programming language used is a compiled language, a conversion unit that converts the source code into an executable file that can be executed in the execution environment;
a transmitter that transmits the source code when the programming language used is a script language, and the executable format file when the programming language used is the compiled language, to the terminal;
a verification environment construction unit that constructs a verification environment equivalent to the execution environment of the terminal based on execution environment information of the terminal;
a verification unit that executes the source code or the executable file on the verification environment and verifies the program before distributing the application program;
Equipped with
The source code acquisition unit determines whether or not it is necessary to acquire the source code based on whether installed application information included in architecture information includes information about an application program that is not installed. Program distribution device.
前記変換部は、コンパイラ及びリンカを含み、
前記端末のコンパイル条件及びリンク条件に基づき、前記ソースコードから前記実行可能形式ファイルとしてバイナリコードファイルを生成することを特徴とする請求項1に記載のプログラム配信装置。
The conversion unit includes a compiler and a linker,
2. The program distribution apparatus according to claim 1, wherein a binary code file is generated as the executable file from the source code based on compiling conditions and linking conditions of the terminal.
前記変換部は、前記ソースコードから、前記実行可能形式ファイルとして、前記端末上の仮想マシンで実行可能な中間言語ファイルを生成することを特徴とする請求項1又は請求項2に記載のプログラム配信装置。 3. The program distribution according to claim 1, wherein the conversion unit generates an intermediate language file executable by a virtual machine on the terminal as the executable format file from the source code. Device. 端末の使用言語情報に基づき、前記端末の実行環境で実行可能な使用プログラミング言語を特定し、一つのプログラムに対し、異なるプログラミング言語を用いたソースコードを管理する管理部から前記使用プログラミング言語を用いた前記ソースコードを取得する工程と、
前記使用プログラミング言語がコンパイル言語である場合、前記ソースコードを前記実行環境で実行可能な実行可能形式ファイルに変換する工程と、
前記使用プログラミング言語がスクリプト言語である場合は前記ソースコードを、前記使用プログラミング言語が前記コンパイル言語である場合は前記実行可能形式ファイルを、前記端末に送信する工程と、
前記端末の実行環境情報に基づいて、前記端末の前記実行環境と同等の検証環境を構築する工程と、
前記検証環境上での前記ソースコード又は前記実行可能形式ファイルを実行し、アプリケーションプログラムの配信前に前記プログラムの検証を行う工程と、
を具備し、
前記端末に送信する工程は、前記ソースコードの取得の要否を、アーキティクチャ情報に含まれるインストールアプリケーション情報にインストールされていないアプリケーションプログラムの情報があったか否かに基づいて判定することを特徴とするプログラム配信方法。
Based on the language information of the terminal, a programming language that can be executed in the execution environment of the terminal is specified, and a management unit that manages source codes using different programming languages uses the programming language for one program. a step of obtaining the source code,
If the programming language used is a compiled language, converting the source code into an executable file that can be executed in the execution environment;
transmitting the source code if the programming language used is a scripting language, or the executable file if the programming language used is the compiled language, to the terminal;
building a verification environment equivalent to the execution environment of the terminal based on the execution environment information of the terminal;
executing the source code or the executable file on the verification environment and verifying the program before distributing the application program;
Equipped with
The step of transmitting to the terminal determines whether or not the source code needs to be acquired based on whether or not there is information about an application program that is not installed in the installed application information included in the architecture information. program delivery method.
JP2019040401A 2019-03-06 2019-03-06 Program distribution device and program distribution method Active JP7367312B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019040401A JP7367312B2 (en) 2019-03-06 2019-03-06 Program distribution device and program distribution method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019040401A JP7367312B2 (en) 2019-03-06 2019-03-06 Program distribution device and program distribution method

Publications (2)

Publication Number Publication Date
JP2020144580A JP2020144580A (en) 2020-09-10
JP7367312B2 true JP7367312B2 (en) 2023-10-24

Family

ID=72354264

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019040401A Active JP7367312B2 (en) 2019-03-06 2019-03-06 Program distribution device and program distribution method

Country Status (1)

Country Link
JP (1) JP7367312B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111930521A (en) * 2020-09-23 2020-11-13 北京百度网讯科技有限公司 Method and device for deploying application, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000122871A (en) 1998-10-14 2000-04-28 Hitachi Ltd Application distributing method
JP2002041465A (en) 1999-11-22 2002-02-08 Mitsubishi Electric Corp Communication system, database server, controller, processing terminal, relay server and manufacturing method of semiconductor device
JP2013020506A (en) 2011-07-12 2013-01-31 Ricoh Co Ltd Communication device, update method and update program
JP2014035744A (en) 2012-08-10 2014-02-24 Nippon Telegr & Teleph Corp <Ntt> Verification management device, verification management method, and verification management program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000122871A (en) 1998-10-14 2000-04-28 Hitachi Ltd Application distributing method
JP2002041465A (en) 1999-11-22 2002-02-08 Mitsubishi Electric Corp Communication system, database server, controller, processing terminal, relay server and manufacturing method of semiconductor device
JP2013020506A (en) 2011-07-12 2013-01-31 Ricoh Co Ltd Communication device, update method and update program
JP2014035744A (en) 2012-08-10 2014-02-24 Nippon Telegr & Teleph Corp <Ntt> Verification management device, verification management method, and verification management program

Also Published As

Publication number Publication date
JP2020144580A (en) 2020-09-10

Similar Documents

Publication Publication Date Title
US11599348B2 (en) Container image building using shared resources
CN109062617B (en) Application method of platform supporting multiple types of equipment and mobile terminal
US20160019072A1 (en) Dynamic determination of application server runtime classloading
JP7131946B2 (en) Method and system for assessing application security
JP7394211B2 (en) Methods, devices, equipment, and media for parallel execution of smart contracts
KR102485935B1 (en) Electronic device and operating method thereof
CN113961919B (en) Malicious software detection method and device
JP2007511816A (en) Dynamic addressing (DA) using centralized DA manager
CN112182584A (en) Security verification method and device, electronic equipment and storage medium
CN115629971A (en) Application development system and method
KR20210029621A (en) Apparatus and method for improving runtime performance after application update in electronic device
EP3207453B1 (en) Api versioning independent of product releases
JP7367312B2 (en) Program distribution device and program distribution method
CN113835713B (en) Source code packet downloading method, device, computer equipment and storage medium
CN107368339B (en) Container entrance program operation method, system, device and storage medium
CN110990833B (en) SDK safety detection method and related equipment
CN113641389B (en) Software upgrading method, device and equipment based on OpenCPU
US20220027263A1 (en) Disk image selection in virtualized network environments
CN113157329A (en) Method, system, server and storage medium for starting application
CN112596751A (en) Compiling method, terminal, server and storage medium of application program installation package
CN113672238B (en) Operation method, device and equipment based on real-time operating system modularized management
US20230037753A1 (en) Code Execution Method and Device
CN113434213B (en) Program running method and device of terminal
CN111045657B (en) Program code operation method and device, and compiling method and device
US20230280994A1 (en) Information processing device and installation support method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221102

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230418

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230612

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: 20230912

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230925

R150 Certificate of patent or registration of utility model

Ref document number: 7367312

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150