JP2014186432A - Electronic apparatus and script generation device - Google Patents
Electronic apparatus and script generation device Download PDFInfo
- Publication number
- JP2014186432A JP2014186432A JP2013059584A JP2013059584A JP2014186432A JP 2014186432 A JP2014186432 A JP 2014186432A JP 2013059584 A JP2013059584 A JP 2013059584A JP 2013059584 A JP2013059584 A JP 2013059584A JP 2014186432 A JP2014186432 A JP 2014186432A
- Authority
- JP
- Japan
- Prior art keywords
- script
- function
- sample
- parameter
- electronic device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45504—Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
- G06F9/45508—Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation
- G06F9/45512—Command shells
Abstract
Description
本発明は、電子機器の機能拡張を実現する技術に関する。 The present invention relates to a technique for realizing functional expansion of an electronic device.
ルータなどの中継装置では、CPU(Central Processing Unit)などの制御部をファームウェアと呼ばれるプログラムにしたがって作動させることで、データの転送制御が実現される。このため、従来、この種の中継装置に新たな機能を付与する機能拡張を行う際には、ファームウェアを更新することが必須であったが、近年では、ファームウェアを更新することなく機能拡張を実現する技術が種々提案されている。例えば、中継装置の制御部などのコンピュータに新たな機能を実現させる処理手順を所定のスクリプト言語を用いて記述した機能拡張用スクリプトを当該コンピュータに実行させることで、ファームウェアを更新することなく機能拡張を実現する、といった具合である。 In a relay device such as a router, data transfer control is realized by operating a control unit such as a CPU (Central Processing Unit) in accordance with a program called firmware. For this reason, in the past, when performing a function expansion to add a new function to this type of relay device, it was essential to update the firmware, but in recent years, the function expansion has been realized without updating the firmware. Various techniques have been proposed. For example, function expansion without updating the firmware is performed by causing the computer to execute a function expansion script in which a processing procedure for realizing a new function in a computer such as a control unit of the relay apparatus is described using a predetermined script language. Is achieved.
機能拡張用スクリプトを用いて中継装置の機能拡張を行う場合、中継装置のユーザは、所望の機能を中継装置に実現させるための機能拡張用スクリプトを作成するなど、機能拡張用スクリプトを自分で用意する必要がある。しかし、機能拡張用スクリプトを作成することは、一般的なユーザにとっては難しい場合が多い。機能拡張用スクリプトを作成するには、その記述に用いるスクリプト言語についての知識やアルゴリズムについての知識が必要となるからである。 When extending the function of a relay device using a function expansion script, the user of the relay device prepares the function expansion script by himself such as creating a function expansion script for realizing the desired function in the relay device. There is a need to. However, it is often difficult for a general user to create a function expansion script. This is because creation of a function expansion script requires knowledge of the script language used for the description and knowledge of the algorithm.
機能拡張用スクリプトを一から書き起こすことなく、中継装置の機能拡張を行えるようにするために、スクリプト言語による機能拡張用スクリプトの記載例(以下、サンプルスクリプト)を配布することも提案されている。このようにして配布されるサンプルスクリプトを各自の中継装置の設定内容に応じて書き換えれば、その中継装置用の機能拡張用スクリプトが得られるからである。しかし、一般的なユーザにとっては、サンプルスクリプトを各自の中継装置の設定内容に応じて書き換えることすら難しい場合があり、また、サンプルスクリプトを書き換えて作成した機能拡張用スクリプトが期待した通りの機能を実現するものであるのか、或いは予期せぬ不具合を引き起こさないかを検証するデバッグ作業を行うことも、一般的なユーザには敷居が高い。これは、スクリプト実行機能を備えた中継装置に固有の問題ではなく、スクリプト実行機能を有し、機能拡張用スクリプトにより機能拡張が可能な電子機器に共通する問題である。 It has also been proposed to distribute a description example of a script for function expansion in a script language (hereinafter referred to as a sample script) so that the function of the relay device can be expanded without writing the function expansion script from scratch. . This is because if the sample script distributed in this way is rewritten according to the setting contents of the respective relay device, a function expansion script for the relay device can be obtained. However, it may be difficult for general users to rewrite the sample script according to the settings of their relay device, and the function expansion script created by rewriting the sample script will not function as expected. It is also difficult for a general user to perform a debugging operation for verifying whether it is realized or whether an unexpected failure is caused. This is not a problem specific to a relay device having a script execution function, but is a problem common to electronic devices that have a script execution function and can be expanded by a function expansion script.
本発明は上記課題に鑑みて為されたものであり、スクリプト実行機能を有する電子機器のユーザがスクリプト言語やデバッグに関する知識を有していなくても、機能拡張用スクリプトを用いて当該電子機器の機能拡張を行えるようにする技術を提供することを目的とする。 The present invention has been made in view of the above problems, and even if a user of an electronic device having a script execution function does not have knowledge about a script language or debugging, the function expansion script is used to The purpose is to provide a technology that enables function expansion.
上記課題を解決するために本発明は、予め設定されたパラメータにしたがって当該電子機器固有の機能を実現する電子機器において、所定のスクリプト言語で記述されたスクリプトを実行するスクリプト実行手段と、電子機器に新たな機能を実現させるための処理手順の前記スクリプト言語による記載例であるサンプルスクリプトを取得し、前記パラメータの設定内容に応じたカスタマイズを当該サンプルスクリプトに施して自装置用の機能拡張用スクリプトを生成するカスタマイズ手段と、を備え、前記スクリプト実行手段は、前記カスタマイズ手段により生成された機能拡張用スクリプトを実行することを特徴とする電子機器、を提供する。 In order to solve the above problems, the present invention provides a script execution means for executing a script described in a predetermined script language in an electronic device that realizes a function unique to the electronic device according to a preset parameter, and the electronic device A sample script which is a description example of the processing procedure for realizing a new function in the script language is acquired, and customization according to the setting content of the parameter is applied to the sample script, and the function expansion script for the own device Customizing means for generating an electronic device, wherein the script execution means executes the function expansion script generated by the customization means.
このような電子機器の具体例としては、第1の通信網と第2の通信網の何れか一方から他方へと送信されたデータの転送制御を予め設定されたパラメータにしたがって実行する転送制御手段を当該装置固有の機能を実現する手段として備え、さらに、所定のスクリプト言語で記述されたスクリプトを実行するスクリプト実行手段と、中継装置に新たな機能を実現させるための処理手順の前記スクリプト言語による記述例であるサンプルスクリプトを取得し、前記転送制御を規定するパラメータの設定内容に応じたカスタマイズを当該サンプルスクリプトに施して自装置用の機能拡張用スクリプトを生成するカスタマイズ手段と、を備え、前記カスタマイズ手段により生成された機能拡張用スクリプトを前記スクリプト実行手段に実行させることを特徴とする中継装置、が挙げられる。このような中継装置では、サンプルスクリプトをカスタマイズして当該中継装置用の機能拡張用スクリプトを生成する処理が当該中継装置によって実行される。このため、中継装置のユーザがサンプルスクリプトの書き換えを行う必要はなく、当該ユーザがスクリプト言語やアルゴリズムに関する知識、デバッグ技術を有していなくても特段の問題は生じない。上記課題を解決するための別の態様としては、中継装置の制御部を上記各手段として機能させるプログラムを提供する態様も考えられる。なお、特許文献1には、コンピュータに自動実行させるタスクを対話形式のユーザインタフェースを介して簡便に定義することを可能にする技術の開示があるが、特許文献1に開示の技術はサンプルスクリプトをカスタマイズして機能拡張用スクリプトを生成する技術ではなく、本願発明とは全く異なる発明である。
As a specific example of such an electronic device, transfer control means for executing transfer control of data transmitted from one of the first communication network and the second communication network to the other according to a preset parameter. As a means for realizing the function specific to the apparatus, and further, script execution means for executing a script described in a predetermined script language, and a processing procedure for realizing a new function in the relay apparatus according to the script language Customizing means for obtaining a sample script that is a description example, and performing customization according to the setting contents of the parameters that define the transfer control to the sample script to generate a function expansion script for the own device, and The function execution script generated by the customization means can be executed by the script execution means. Relay device according to claim, and the like. In such a relay apparatus, processing for customizing a sample script and generating a function expansion script for the relay apparatus is executed by the relay apparatus. For this reason, it is not necessary for the user of the relay device to rewrite the sample script, and no particular problem occurs even if the user does not have knowledge about the script language or algorithm or debugging technology. As another aspect for solving the above-described problem, an aspect in which a program for causing the control unit of the relay device to function as each of the above-described units is conceivable.
ところで、サンプルスクリプトには、当該サンプルスクリプトをカスタマイズして生成される機能拡張用スクリプトの実行に先立って新たなパラメータを設定することを促すコメント(機能拡張用スクリプトのソースコードの閲覧者に宛てた注意書き)を表す文字列(以下、コメント文字列)が含まれている場合がある。このようなサンプルスクリプトをユーザが手作業でカスタマイズして機能拡張用スクリプトを生成し、電子機器に実行させる場合には、そのカスタマイズの際にコメント文字列を削除し、さらに機能拡張用スクリプトの実行開始に先立ってそのコメント文字列の表すコメントにしたがったパラメータ設定を行っておく必要があった。そこで、サンプルスクリプトに、当該サンプルスクリプトをカスタマイズして生成される機能拡張用スクリプトの実行に先立って新たなパラメータを設定することを促すコメント文字列が含まれている場合には、カスタマイズの際に当該コメント文字列を削除し、スクリプト実行手段による機能拡張用スクリプトの実行に先立って当該コメント文字列の表すコメントにしたがって新たなパラメータを設定する処理をカスタマイズ手段に実行させるようにすれば良い。このような態様によれば、スクリプト言語やアルゴリズムに関する知識、デバッグ技術を有していないことは勿論、新たなパラメータの設定などの環境設定に関する知識も有していないユーザであっても、機能拡張用スクリプトを用いて、自身の利用する電子機器の機能拡張を実現することが可能になる。 By the way, in the sample script, a comment (addressed to the viewer of the source code of the function extension script) is urged to set a new parameter prior to the execution of the function extension script generated by customizing the sample script. There may be a case where a character string (hereinafter referred to as a comment character string) is included. When such a sample script is manually customized by a user to generate a function expansion script and execute it on an electronic device, the comment character string is deleted at the time of customization, and the function expansion script is executed. Prior to the start, it was necessary to set parameters according to the comment represented by the comment string. Therefore, if the sample script contains a comment character string that prompts you to set a new parameter prior to the execution of the extension script generated by customizing the sample script, The comment character string may be deleted, and the customization unit may be caused to execute a process for setting a new parameter in accordance with the comment represented by the comment character string prior to the execution of the function expansion script by the script execution unit. According to such an aspect, even if the user does not have knowledge about the script language or algorithm and debugging technology, and also does not have knowledge about environment setting such as setting of a new parameter, the function can be expanded. It is possible to realize the function expansion of the electronic device used by the user script.
また、サンプルスクリプトの具体的な記述態様としては、電子機器固有の機能を実現するためのパラメータの値、または当該パラメータの設定内容に応じて定まる新たなパラメータの値の引用箇所に、それらの値に換えてパラメータ毎に異なる識別子(例えば、文字列)を記述する態様が挙げられる。このようなサンプルスクリプトをユーザが手作業でカスタマイズして機能拡張用スクリプトを生成する場合、それら識別子を該当パラメータの値に書き換えるといった作業が行われていた。このようなサンプルスクリプトからの機能拡張用スクリプトの自動生成を可能とするため、カスタマイズ手段には、サンプルスクリプトに含まれている識別子と当該識別子の示すパラメータとを対応付けるパラメータ定義データをサンプルスクリプトとともに取得させ、取得したサンプルスクリプトに含まれている識別子を当該パラメータ定義データの内容にしたがって当該識別子の示すパラメータの値に書き換えて機能拡張用スクリプトを生成する処理を実行させても良い。 In addition, as a specific description mode of the sample script, the value of a parameter for realizing a function specific to the electronic device or a new parameter value determined according to the setting content of the parameter is described in the value. Instead of this, there is a mode in which different identifiers (for example, character strings) are described for each parameter. When such a sample script is manually created by a user and a function expansion script is generated, an operation of rewriting these identifiers to values of corresponding parameters has been performed. In order to enable automatic generation of a function extension script from such a sample script, the customization means acquires parameter definition data that associates the identifier included in the sample script with the parameter indicated by the identifier together with the sample script. The identifier included in the acquired sample script may be rewritten to the parameter value indicated by the identifier according to the contents of the parameter definition data, and the process of generating the function expansion script may be executed.
また、パラメータ定義データにおいて、電子機器固有の機能を実現するためのパラメータの設定内容に応じて定まる新たなパラメータに対応する識別子に、当該新たなパラメータの値についての各々異なる算出方法を示す複数のデータが対応づけられている場合には、カスタマイズ手段にはこれら複数種の算出方法の何れかにより上記新たなパラメータの値を算出させるようにしても良い。例えば、上記電子機器が中継装置である場合、複数種の算出方法の一例としては、中継装置に設定済みのパラメータを相互に突合せ、その突合せ結果に基づいて新たなパラメータ値を算出(或いは、特定)する方法や、中継装置を介して実行されたデータ通信の流れを解析して新たなパラメータ値を算出(或いは、特定)する態様が挙げられる。中継装置に設定済みのパラメータの相互の関係からは新たなパラメータの値を特定できない場合であっても、データ通信の流れに着目すれば当該パラメータの値を特定できる場合がある。このため、本態様によれば、新たなパラメータの値を全く算出できないといった不具合の発生頻度を低減させることができると期待される。 In the parameter definition data, an identifier corresponding to a new parameter determined according to the setting content of the parameter for realizing the function unique to the electronic device has a plurality of different calculation methods for the value of the new parameter. If the data is associated, the customizing unit may calculate the new parameter value by any one of these multiple calculation methods. For example, when the electronic device is a relay device, as an example of a plurality of types of calculation methods, parameters already set in the relay device are matched with each other, and new parameter values are calculated (or specified) based on the matching result. And a method of calculating (or specifying) a new parameter value by analyzing the flow of data communication executed via the relay device. Even when a new parameter value cannot be identified from the mutual relationship between parameters already set in the relay apparatus, the parameter value may be identified by paying attention to the flow of data communication. For this reason, according to this aspect, it is expected that the frequency of occurrence of problems such as the inability to calculate new parameter values at all can be reduced.
また、上記課題を解決するために本発明は、予め設定されたパラメータにしたがって固有の機能を実現する電子機器であって、所定のスクリプト言語で記述されたスクリプトを実行する機能を備えた電子機器と通信網を介して通信し、前記パラメータを取得する取得手段と、前記電子機器に新たな機能を実現させるための処理手順の前記スクリプト言語による記載例であるサンプルスクリプトに、前記取得手段により取得したパラメータに応じたカスタマイズを施して前記電子機器用の機能拡張用スクリプトを生成する生成手段と、を有することを特徴とするスクリプト生成装置、を提供する。 In order to solve the above-described problem, the present invention provides an electronic device that realizes a specific function according to a preset parameter, and has a function of executing a script described in a predetermined script language. The acquisition unit acquires the parameter obtained by the acquisition unit that communicates via the communication network with the sample script that is a description example in the script language of the processing procedure for realizing the electronic device with a new function. There is provided a script generation device comprising: a generation unit configured to generate a function expansion script for the electronic device by performing customization according to the parameter.
このような態様によっても、スクリプト実行機能を有する電子機器のユーザがスクリプト言語やデバッグに関する知識を有していなくても、機能拡張用スクリプトを用いて簡便に当該電子機器の機能拡張を行うことが可能になる。なお、スクリプト生成装置の具体例としては、サンプルスクリプトを格納した記憶部を有し、当該サンプルスクリプトを通信網を介して電子機器に配信するサンプルスクリプト配信装置が挙げられる。例えば、電子機器からその電子機器固有の機能を実現するためのパラメータを取得した場合には、サンプルスクリプトに換えて当該サンプルスクリプトに当該電子機器から取得したパラメータに応じたカスタマイズを施して生成した機能拡張用スクリプトを配信する処理を実行させるのである。また、上記電子機器がルータなどの中継装置である場合には、当該中継装置配下の端末装置に上記スクリプト生成装置の役割を担わせても良い。具体的には、中継装置を介して取得したサンプルスクリプトに当該中継装置から取得したパラメータに応じたカスタマイズを施して当該中継装置用の機能拡張用スクリプトを生成して当該中継装置に与える処理を上記端末装置に実行させるのである。なお、本発明の別の態様としては、パーソナルコンピュータなどの一般的なコンピュータを上記取得手段および生成手段として機能させるプログラムを配布する態様も考えられる。 Even in such an aspect, even if a user of an electronic device having a script execution function does not have knowledge about a script language or debugging, the function of the electronic device can be easily expanded using the function expansion script. It becomes possible. A specific example of the script generation apparatus is a sample script distribution apparatus that has a storage unit that stores a sample script and distributes the sample script to an electronic device via a communication network. For example, when a parameter for realizing a function specific to the electronic device is acquired from the electronic device, the function generated by customizing the sample script according to the parameter acquired from the electronic device instead of the sample script The process of distributing the extension script is executed. When the electronic device is a relay device such as a router, the terminal device under the relay device may play the role of the script generation device. More specifically, the sample script acquired via the relay device is customized according to the parameters acquired from the relay device to generate a function expansion script for the relay device, and the processing given to the relay device It is executed by the terminal device. As another aspect of the present invention, an aspect of distributing a program that causes a general computer such as a personal computer to function as the acquisition unit and the generation unit may be considered.
以下、図面を参照しつつ本発明の一実施形態について説明する。
図1は、本発明の一実施形態の中継装置10を含む通信システム1の構成例を示すブロック図である。この通信システム1は、例えば企業における情報システムを為すものである。この通信システム1は、上記企業の本社内に敷設された本社側LAN(Local Area Network)と同企業の支店に敷設された支店側LANとをインターネットなどの広域網に接続して構成されている。図1に示すように、本社側LANはルータなどの中継装置を介して広域網に接続されており、支店側LANは中継装置10を介して広域網に接続されている。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram illustrating a configuration example of a
中継装置10は、例えばルータであり、支店側LANに接続されているパーソナルコンピュータPC1或いはPC2と、インターネットに接続されているWWWサーバ装置或いは本社側LANに接続されているPC3との間でTCP/IP(Transport Control Protocol/Internet Protocol)に従って送受信されるデータの転送制御を行う。中継装置10では、CPUなどにより構成された制御部をファームウェアにしたがって作動させることで上記転送制御が実現される。また、中継装置10は、所定のスクリプト言語(本実施形態では、Lua)を用いて記述されたスクリプトを実行するスクリプト実行機能を有している。このため、中継装置10のユーザは、中継装置10に新たな機能を実現させるための処理手順を上記スクリプト言語で記述した機能拡張用スクリプトを中継装置10に実行させることで、中継装置10の機能拡張を行うことができる。本実施形態において上記スクリプト言語としてLuaを採用したのは、perlやJava(登録商標)などの他のスクリプト言語に比較してスクリプト実行処理の処理負荷が小さく、ルータへの組み込みに好適だからである。
The
中継装置10のユーザ(例えば支店側LANの運用管理者)は、上記機能拡張用スクリプトの記載例であるサンプルスクリプトを、広域網に接続されたサンプルスクリプト配信装置20からのダウンロードにより入手することができる。サンプルスクリプト配信装置20は、中継装置10の製造・販売元の企業によって運用管理されているWWWサーバ装置である。サンプルスクリプト配信装置20には、当該製造・販売元により作成されたサンプルスクリプトが予め記憶されている。図2(a)は、サンプルスクリプト配信装置20に記憶されているサンプルスクリプトの一例を示す図である。このサンプルスクリプトでは、中継装置におけるデータの転送制御を規定する各種パラメータ(LANインタフェース番号やそのLANインタフェースの配下のパーソナルコンピュータに割り当てられてられるIPアドレスの範囲(例えば、DHCPにより各パーソナルコンピュータへの通信アドレスの割り当てを行う場合には、DHCPスコープの設定番号)など)を引用する箇所に、当該パラメータの具体的な値に換えて当該パラメータを示す識別子が記述されている。
A user of the relay device 10 (for example, a branch LAN operation manager) can obtain a sample script, which is a description example of the function expansion script, by downloading from the sample
例えば、図2(a)に示すサンプルスクリプトでは、ローカルネットワーク側のLANインタフェースとして機能しスイッチ制御機能を実現している通信インタフェース部のLANインタフェース番号に換えて、“PRM_STR_SWITCH_ USING_ LAN_IFNUM”という識別子が記述されている。また、図2(a)のサンプルスクリプトにおける“PRM_NUM_DHCP_SCOPE_ LANIF1”という識別子は、ローカルネットワーク側のLANインタフェースのDHCPスコープ設定番号を示している。そして、図2(a)に示すサンプルスクリプトにおける識別子“@CFG@”以下の各行は、機能拡張用スクリプトの実行に先立って、これら各行の示すパラメータ設定を行っておくことをユーザに促すコメント文字列である。 For example, in the sample script shown in FIG. 2A, an identifier “PRM_STR_SWITCH_USING_LAN_IFNUM” is described in place of the LAN interface number of the communication interface unit that functions as the LAN interface on the local network side and implements the switch control function. Has been. In addition, the identifier “PRM_NUM_DHCP_SCOPE_LANIF1” in the sample script of FIG. 2A indicates the DHCP scope setting number of the LAN interface on the local network side. Each line below the identifier “@ CFG @” in the sample script shown in FIG. 2A is a comment character that prompts the user to set the parameters shown in each line before executing the function expansion script. Is a column.
このように、サンプルスクリプトではデータ転送制御を規定する各種パラメータの具体的な値に換えてそれらパラメータを示す識別子が記述されており、また、図2(a)に示すように、パラメータの追加設定をユーザに促すコメント文字列が含まれている場合もある。このため、サンプルスクリプト配信装置20から取得したサンプルスクリプトをそのまま機能拡張用スクリプトとして中継装置10に実行させることはできない。従来は、中継装置10のユーザは、テキストエディタなどを用いてサンプルスクリプトにおける各識別子を該当するパラメータの値に書き換えるといった作業や、コメント文字列の削除およびコメント文字列の示すパラメータの追加設定などの作業を行わねばならなかった。
As described above, in the sample script, identifiers indicating the parameters are described in place of the specific values of the various parameters that define the data transfer control. Further, as shown in FIG. In some cases, a comment character string that prompts the user to be included is included. For this reason, the sample script acquired from the sample
例えば、ローカルネットワーク側のLANインタフェースとして機能しスイッチ制御機能を実現している通信インタフェース部のLANインタフェース番号が“1”であり、ローカルネットワーク側のLANインタフェースのDHCPスコープの設定番号が“5”である場合には、図2(b)に示すようにサンプルスクリプトを書き換えて機能拡張用スクリプトとし、さらに図2(c)に示す設定を中継装置10の設定ファイルに書き加えるといった作業を行わねばならなかった。しかし、これらの作業が一般的なユーザにとって敷居の高いものであることは前述した通りである。これに対して、本実施形態では、自装置におけるデータ転送制御を規定するパラメータに応じてサンプルスクリプトを書き換える処理や、コメント文字列の削除およびコメント文字列の示す追加設定を中継装置10に実行させることで、上記問題点が解決される。
以下、本実施形態の特徴を顕著に示す中継装置10を中心に説明する。
For example, the LAN interface number of the communication interface unit functioning as the LAN interface on the local network side and realizing the switch control function is “1”, and the setting number of the DHCP scope of the LAN interface on the local network side is “5”. In some cases, it is necessary to rewrite the sample script as shown in FIG. 2B to obtain a function expansion script, and to add the setting shown in FIG. 2C to the setting file of the
Hereinafter, the
図3(a)は、中継装置10の構成例を示すブロック図である。
図3(a)に示すように中継装置10は、制御部100、第1通信インタフェース(以下、「I/F」)部110、第2通信I/F部120、外部機器I/F部130、記憶部140、および、これら構成要素間のデータ授受を仲介するバス150を含んでいる。制御部100はCPUであり、記憶部140(より正確には、記憶部140に含まれている不揮発性記憶部144)に格納されているプログラムを実行することにより、中継装置10の制御中枢として機能する。詳細については後述するが、本実施形態では、中継装置10のファームウェアである通信制御プログラム144a、および機能拡張プログラム144bの2種類のプログラムが不揮発性記憶部144に予め格納されている。
FIG. 3A is a block diagram illustrating a configuration example of the
As illustrated in FIG. 3A, the
第1通信I/F部110は、NIC(Network Interface Card)であり、図1の支店側LANに接続されている。第1通信I/F部110は、支店側LANから送信されてくるパケットを受信して制御部100へ引渡す一方、制御部100から引渡されるパケットを支店側LANへと送出する。第2通信I/F部120も第1通信I/F部110と同様にNICであり、広域網に接続されている。この第2通信I/F部120は、広域網から送信されてくるパケットを受信して制御部100へ引渡す一方、制御部100から受け取ったパケットを広域網へと送出する。
The first communication I /
外部機器I/F部130は、USB(Universal Serial Buss)メモリ等の外部記憶媒体やシリアルコンソールなどの外部機器との間で所定のプロトコル(USBやRS−232C)にしたがってデータの授受を行うためのものである。例えば、外部機器としてUSBメモリを用いる場合には、USBインタフェースで外部機器I/F部130を構成すれば良く、外部機器としてシリアルコンソールを用いる場合には、RS−232Cインタフェースなどのシリアルインタフェースで外部機器I/F部130を構成すれば良い。外部機器I/F部130は、この外部機器I/F部130に接続される外部機器から中継装置10に対して各種指示やデータを与えるためのものである。
The external device I /
記憶部140は、図3(a)に示すように揮発性記憶部142と不揮発性記憶部144を含んでいる。揮発性記憶部142は、例えばRAM(Random Access Memory)であり、各種プログラムを実行する際のワークエリアとして制御部100によって利用される。また、揮発性記憶部142には、データ転送制御を行う際に参照されるデータ(例えば、ルーティングテーブル)が格納される。一方、不揮発性記憶部144は、ハードディスクやフラッシュメモリである。図3(a)に示すように不揮発性記憶部144には、前述した通信制御プログラム144aおよび機能拡張プログラム144bの他に、ブラウザを用いて中継装置10の動作設定を行う際の設定メニュー画面を表すHTMLデータ(図3(a)では図示略)と設定ファイル144cとが格納されている。なお、外部機器I/F部130にシリアルコンソールを接続し、当該シリアルコンソールに対する操作により動作設定を行わせる場合には、上記HTMLデータを不揮発性記憶部144に格納しておく必要はない。
The
図4は、本実施形態における設定メニュー画面の一例を示す図である。図4に示す設定メニュー画面は、中継装置10からダウンロードしたHTMLデータをブラウザに解釈させることによりそのダウンロード先のパーソナルコンピュータの表示部に表示される。図4に示す設定メニュー画面では、仮想ボタンB01、B02およびB03をマウスクリック等することで、一般的なブラウザ画面と同様に、設定メニュー画面の最小化、最大化および破棄を指示することができる。
FIG. 4 is a diagram illustrating an example of a setting menu screen in the present embodiment. The setting menu screen shown in FIG. 4 is displayed on the display unit of the personal computer of the download destination by causing the browser to interpret the HTML data downloaded from the
図4に示す設定メニュー画面の領域A01には、中継装置10の制御部100が通信制御プログラム144aにしたがって実現する通信制御機能についての設定項目が配列されており、これら設定項目の各々にはパラメータ等の変更等を制御部100に指示するためのリンク情報が対応付けられている。図4に示す設定メニュー画面では、これら設定項目をマウスクリック等することで、一般的なブラウザ画面と同様に該当する設定項目の変更を制御部100に指示し、該当するパラメータの更新等を行わせることができる。
In the area A01 of the setting menu screen shown in FIG. 4, setting items for the communication control function realized by the
図4に示す設定メニュー画面の領域A02には、中継装置10の機能拡張を実現するための機能拡張メニューがインラインフレーム等を利用して表示される。より詳細に説明すると、機能拡張メニューは、中継装置10からダウンロードしたHTMLデータとは別個にサンプルスクリプト配信装置20からダウンロードするHTMLデータにしたがって表示される。サンプルスクリプト配信装置20には当該サンプルスクリプト配信装置20によって配信可能な機能拡張用スクリプトのサンプルについての機能拡張メニューを表すHTMLデータが格納されている。そして、中継装置10の不揮発性記憶部144に格納されているHTMLデータには、当該HTMLデータのダウンロード先のブラウザに対して機能拡張メニューのHTMLデータのダウロードを指示するリンク情報が埋め込まれている。中継装置10から設定メニュー画面のHTMLデータをダウンロードしたパーソナルコンピュータは、当該HTMLデータに埋め込まれているリンク情報にしたがってサンプルスクリプト配信装置20から機能拡張メニューのHTMLデータをダウンロードし、このHTMLデータの取得を契機として図4に示す設定メニュー画面を表示する。このため、中継装置10の製造・販売元の企業が新たなサンプルスクリプトの配布を開始する場合には、当該サンプルスクリプトをサンプルスクリプト配信装置20に記憶させ、さらに当該サンプルスクリプトに関する情報の掲載されたものに機能拡張メニューのHTMLデータを更新しておけば良く、中継装置10に格納されているHTMLデータ(設定メニュー画面のHTMLデータ)を更新したり、中継装置10のファームウェアを更新することなく、当該新たな機能を中継装置10のユーザに利用させることができる。
In the area A02 of the setting menu screen shown in FIG. 4, a function expansion menu for realizing function expansion of the
図4の領域A02に表示される機能拡張メニューには、サンプルスクリプト配信装置20によって配信可能な機能拡張用スクリプトのサンプル(すなわち、拡張可能な機能)毎に当該機能の使用の可否をユーザに指定させるためのラジオボタンと当該機能の詳細な説明文とが掲載されている。拡張機能の使用をユーザに指示させるラジオボタンには、当該拡張機能を制御部100に実現させる機能拡張用スクリプトのサンプルへのリンク情報が対応付けられており、当該ラジオボタンをマウスクリック等することで当該サンプルスクリプトのダウンロードを指示することができる。機能拡張メニューに対する操作によって新たな機能のサンプルスクリプトのダウンロードを指示されたパーソナルコンピュータは、上記リンク情報にしたがってサンプルスクリプト配信装置20にアクセスして該当するサンプルスクリプトをダウンロードする。そして、上記パーソナルコンピュータは、設定メニュー画面のHTMLデータの配信元(本実施形態では、中継装置10)に当該サンプルスクリプトを送信し、カスタマイズして実行することを指示する。
In the function expansion menu displayed in the area A02 of FIG. 4, the user is permitted to use the function for each function expansion script sample (ie, expandable function) that can be distributed by the sample
設定ファイル144cには、中継装置10におけるデータ転送制御を規定する各種パラメータ(前述したLANインタフェース番号等)を示す識別子に対応づけて、当該パラメータの具体的な設定値が書き込まれている。なお、機能拡張用スクリプトの実行に先立って新たなパラメータを設定する必要がある場合には、当該新たなパラメータの設定値をそのパラメータを示す識別子と対応づけて設定ファイル144cに追記すれば良い。通信制御プログラム144aは、支店側LANと本社側LANの何れか一方から他方へと送信されたデータの転送制御を設定ファイル144cに書き込まれた各種パラメータにしたがって実行する転送制御処理を制御部100に実行させるプログラムである。制御部100は、中継装置10の電源投入を契機として通信制御プログラム144aの実行を開始し、以降、上記転送制御処理を実行する転送制御手段(図3(b))として機能する。この通信制御プログラム144aにしたがって実行される転送制御処理については、従来のルータにおけるものと特段に変わるところはないため、詳細な説明を省略する。
In the
機能拡張プログラム144bは、カスタマイズ処理およびスクリプト実行処理を制御部100に実行させるプログラムである。本実施形態では、機能拡張プログラム144bについても中継装置10の電源投入を契機としてその実行が開始される。制御部100は機能拡張プログラム144bを実行することにより、図3(b)に示すように、カスタマイズ処理を実行するカスタマイズ手段として機能するとともに、スクリプト実行処理を実行するスクリプト実行手段として機能する。
The
カスタマイズ処理は、サンプルスクリプトと当該サンプルスクリプトと対になるパラメータ定義データとを配下のパーソナルコンピュータから受信したことを契機としてその実行が開始される処理である。パラメータ定義データとは、サンプルスクリプトとともにサンプルスクリプト配信装置20から配信されるデータであり、当該パラメータ定義データとともに配布されるサンプルスクリプトに含まれる識別子を設定ファイル144cに格納されている各パラメータと対応づけるデータである。このような、パラメータ定義データの具体例としては、サンプルスクリプトに含まれる識別子と当該識別子の示すパラメータの具体的な設定値と対応付けて設定ファイル144cに書き込まれている識別子とを対応づけたデータが挙げられる。
The customization process is a process that starts when a sample script and parameter definition data paired with the sample script are received from a subordinate personal computer. The parameter definition data is data distributed from the sample
カスタマイズ処理では、制御部100は、パラメータ定義データにしたがって、サンプルスクリプトに含まれている識別子を設定ファイル144cに格納されているパラメータの値に置き換えて自装置用の機能拡張用スクリプトを生成し不揮発性記憶部144に格納する。なお、サンプルスクリプトに、新たなパラメータの設定を促すコメント文字列(図2(a)に示す例では、@CHG@以降の各行)が含まれている場合には、制御部100は、当該コメント文字列にしたがって設定ファイル144cに新たなパラメータを追記する処理、および上記識別子とパラメータとの置き換えを施したスクリプトから当該コメント文字列を削除する処理も実行する。
以上がカスタマイズ処理の内容である。
In the customization process, the
The above is the content of the customization process.
スクリプト実行処理とは、機能拡張用スクリプトを実行する処理である。本実施形態では、機能拡張用スクリプトを記述するためのスクリプト言語としてLuaが採用されている。このため、スクリプト実行処理には、実行対象の機能拡張用スクリプトに記述されている各処理手順を構成する命令をバイトコードと呼ばれる中間コードに変換する処理と、そのバイトコードをLuaVMにより実行する処理とが含まれている。スクリプト実行処理の実行契機については種々の態様が考えられる。具体的には、カスタマイズ処理を実行して新たな機能拡張用スクリプトを生成したこと、配下のパーソナルコンピュータから実行指示を与えられたなど所定のイベントが発生したことなどが挙げられる。
以上が中継装置10の構成である。
The script execution process is a process for executing a function expansion script. In this embodiment, Lua is adopted as a script language for describing a function expansion script. For this reason, script execution processing includes processing for converting instructions constituting each processing procedure described in the function extension script to be executed into intermediate code called bytecode, and processing for executing the bytecode by LuaVM. And are included. Various modes can be considered for the execution trigger of the script execution process. Specifically, the customization process is executed to generate a new function expansion script, or a predetermined event occurs such as an execution instruction is given from a subordinate personal computer.
The above is the configuration of the
次いで、中継装置10の機能拡張を実現する手順に即して、本実施形態の動作を説明する。中継装置10の機能拡張を所望する場合、ユーザは支店側LANに接続されたパーソナルコンピュータ(本動作例では、パーソナルコンピュータPC1)にてWWWブラウザを起動し、設定メニュー画面のHTMLデータのダウンロード指示を与える。パーソナルコンピュータPC1の制御部は、上記HTMLデータのダウンロードを要求する要求メッセージQ100を当該指示にしたがって中継装置10へ送信する(図5参照)。中継装置10の制御部100は当該要求メッセージQ100を受信すると、不揮発性記憶部144から上記HTMLデータを読み出し、当該HTMLデータをペイロード部に書き込んだ応答メッセージR100を返信する(図5参照)。
Next, the operation of the present embodiment will be described in accordance with the procedure for realizing the function expansion of the
パーソナルコンピュータPC1の制御部は、応答メッセージR100を受信すると、当該応答メッセージR100のペイロードに書き込まれているHTMLデータを読み出し、ブラウザを用いて当該HTMLデータの表す設定メニュー画面の表示処理を開始する。前述したように、当該HTMLデータには、設定メニュー画面の領域A02に機能拡張メニューを表示させるためのリンク情報が埋め込まれている。パーソナルコンピュータPC1の制御部は、機能拡張メニューのHTMLデータのダウンロードを要求する要求メッセージQ110を上記リンク情報にしたがってサンプルスクリプト配信装置20へ送信する(図5参照)。サンプルスクリプト配信装置20の制御部は当該要求メッセージQ110を受信すると、機能拡張メニューを表すHTMLデータをペイロード部に書き込んだ応答メッセージR110を返信する(図5参照)。パーソナルコンピュータPC1の制御部は、当該応答メッセージR110を受信して設定メニュー画面の表示に必要なデータが全て揃うと、図4に示す設定メニュー画面を表示部に表示させる(図5:ステップS100)。
When receiving the response message R100, the control unit of the personal computer PC1 reads the HTML data written in the payload of the response message R100, and starts display processing of the setting menu screen represented by the HTML data using a browser. As described above, link information for displaying the function extension menu is embedded in the HTML data in the area A02 of the setting menu screen. The control unit of the personal computer PC1 transmits a request message Q110 requesting downloading of HTML data of the function expansion menu to the sample
図4に示す設定メニュー画面を視認したユーザは、機能拡張メニューのラジオボタンを操作することによって、新に使用を所望する機能(図4における、機能Aおよび機能B)を選択し、当該機能拡張を実現するための機能拡張用スクリプトのサンプルのダウンロードをパーソナルコンピュータPC1の制御部に指示することができる。パーソナルコンピュータPC1の制御部は、ユーザによりダウンロードを指示されたサンプルスクリプトのダウンロードを要求する要求メッセージQ120を生成し、当該要求メッセージQ120をサンプルスクリプト配信装置20へ送信する(図5参照)。サンプルスクリプト配信装置20は、要求メッセージQ120を受信すると、当該要求メッセージQ120にてダウンロードを要求されたサンプルスクリプトおよび当該サンプルスクリプトと対になるパラメータ定義データを自装置の記憶部から読み出し、当該サンプルスクリプトおよびパラメータ定義データをペイロード部に書き込んだ応答メッセージR120を返信する。
The user who visually recognizes the setting menu screen shown in FIG. 4 selects a function (function A and function B in FIG. 4) to be newly used by operating a radio button of the function extension menu, and the function extension. It is possible to instruct the control unit of the personal computer PC1 to download a sample of a function expansion script for realizing the above. The control unit of the personal computer PC1 generates a request message Q120 for requesting download of the sample script instructed to download by the user, and transmits the request message Q120 to the sample script distribution apparatus 20 (see FIG. 5). When the sample
パーソナルコンピュータPC1の制御部は、応答メッセージR120を受信すると、この応答メッセージR120のペイロード部に書き込まれているサンプルスクリプトおよびパラメータ定義データを読み出し、ペイロード部に当該サンプルスクリプトとパラメータ定義データとを書き込んだ通信メッセージであって、当該サンプルスクリプトを対象としてカスタマイズ処理およびスクリプト実行処理を実行することを指示する要求メッセージQ130を生成し、当該要求メッセージQ130を中継装置10へ送信する。
When receiving the response message R120, the control unit of the personal computer PC1 reads the sample script and parameter definition data written in the payload portion of the response message R120, and writes the sample script and parameter definition data in the payload portion. A request message Q130, which is a communication message and instructs execution of customization processing and script execution processing for the sample script, is generated, and the request message Q130 is transmitted to the
中継装置10の制御部100は、要求メッセージQ130を受信すると、この要求ンメッセージQ130のペイロード部に書き込まれているサンプルスクリプトとパラメータ定義データを読み出し、前述したカスタマイズ処理S110(すなわち、サンプルスクリプトに含まれているパラメータを示す識別子を当該パラメータの設定値に書き換える処理、さらにコメント文字列の削除およびコメント文字列にしたがった新たなパラメータの設定を行う処理)を実行し、さらにカスタマイズ処理S110により生成した機能拡張用スクリプトを実行するスクリプト実行処理S120を実行する。これにより、ユーザにより中継装置10の機能拡張が実現される。
When receiving the request message Q130, the
ここで、機能拡張用スクリプトの実行により中継装置10に付与される新たな機能としては、常駐型の機能(当該機能を実現する処理手順に無限ループが含まれており、割り込み処理等により実行停止が指示されるまで処理を継続する機能)と、ターンアラウンド型の機能(処理結果の記憶や出力で処理を終了する機能)とが考えられる。例えば、ターンアラウンド型の機能の一例としては、設定ファイル144cの設定内容や中継装置10の稼動ログファイルを所定の出力先(外部機器I/F部130に接続されたシリアルコンソールやUSBメモリ、或いは支店側LANに接続されたパーソナルコンピュータ)に出力する機能が挙げられる。このような機能を付与することで、中継装置10に対する動作設定の設定内容や稼動ログのレポート出力が可能となり、中継装置10の運用管理がし易くなる、といった利点がある。
Here, as a new function given to the
これに対して、常駐型の機能の一例としては、図6に示すフローチャートで処理手順が示される通信状態監視機能が挙げられる。この通信状態監視機能は、一定の時間間隔(本実施形態では、600秒)で中継装置10を介したデータ通信の通信状態を監視し、その監視結果に応じたQoS(Quality of Service)の開始(或いは停止)およびその監視結果を所定の宛先に通知する機能である。図6に示すように、この通信状態監視機能は、所定回数だけpingパケットを支店側LANのゲートウェイ装置(図示略)へ送信する処理(ステップSA100)、これらpingパケットに対する応答パケットの受信数から算出されるパケットロス率に応じてQoSの開始および停止を制御する処理(ステップSA110、SA120、SA150およびSA160)、その監視結果を示すデータを所定の宛先へ電子メール等で通知する処理(ステップSA130)、および、600秒間の休眠を行う処理(ステップSA140)を順次実行することで実現される。常駐型の機能の他の具体例としては、特定の通信ログが稼働ログファイルに出力されたか否かを監視し、特定の通信ログが出力されたことを契機として通知処理等を実行し、再度、当該特定の通信ログが出力されるまで休眠するといった態様も考えられる。なお、常駐型の機能の場合には、中継装置10の電源が投入される毎(或いはリセットされる毎)に当該機能を実現する機能拡張用スクリプトを対象としてスクリプト実行処理を制御部100に実行させるようにすれば良い。
On the other hand, as an example of the resident function, there is a communication state monitoring function whose processing procedure is shown in the flowchart shown in FIG. This communication state monitoring function monitors the communication state of data communication via the
上記通信状態監視機能を中継装置10に実現させる機能拡張用スクリプトのサンプルの一例としては、図6に示す処理手順をLuaにより記述したサンプルスクリプトが挙げられる。ここで、pingパケットをゲートウェイ装置へ送信する際には、ゲートウェイ装置の通信アドレスが必要となるのであるが、ゲートウェイ装置の通信アドレスは中継装置毎に異なることが一般的である。このため、サンプルスクリプトでは、ゲートウェイ装置の通信アドレスの具体的な値に換えて当該通信アドレスを示す識別子が記載されている。制御部100は、上記パラメータ定義データおよび設定ファイル144cを参照して上記識別子をゲートウェイ装置の通信アドレスに置き換え、自装置用の機能拡張用スクリプトを生成し実行するのである。
An example of a sample of a function expansion script that causes the
このように、本実施形態によれば、サンプルスクリプトを自装置用にカスタマイズして機能拡張用スクリプトを生成する処理が中継装置10の制御部100によって実行されるため、中継装置10のユーザがスクリプト言語やアルゴリズムに関する知識やデバック技術を有していなくても、機能拡張用スクリプトを用いて中継装置10の機能拡張を行うことが可能になる。
As described above, according to the present embodiment, the process of customizing the sample script for the own device and generating the function expansion script is executed by the
以上本発明の一実施形態について説明したが、この実施形態を以下のように変形しても勿論良い。
(1)上記実施形態では、ルータへの本発明の適用例を説明したが、スイッチングハブに本発明を適用しても勿論良い。要は、第1および第2の通信網に接続され、これら2つの通信網の一方から他方へと送信されたデータの転送制御を予め設定されたパラメータにしたがって行う機能と、スクリプト実行機能とを備えた中継装置であれば、本発明を適用することができる。また、本発明の適用対象はルータやスイッチングハブに限定されるものではなく、予め設定されたパラメータにしたがってデータ通信を行う通信手段を備えた通信装置(例えば、所謂スマートフォンなどの移動通信端末)、携帯型或いは据え置き型のゲーム機、電子楽器や所謂情報家電であっても良い。要は、予め設定されたパラメータにしたがって固有の機能を実現する手段(図3(b)における転送制御手段に相当する手段、ゲーム機であれば、ゲームプログラムの解釈および実行を行い、設定されたパラメータに応じてゲーム画面の表示制御や音声出力制御を行う手段、電子楽器であればユーザの操作および設定されたパラメータに応じて楽音データを生成する手段など)を有する電子機器であって、スクリプト実行手段を備えた電子機器であれば、本発明を適用すること(すなわち、カスタマイズ手段を設け、当該カスタマイズ手段によりカスタマイズされた機能拡張用スクリプトをスクリプト実行手段に実行させること)によって機能拡張用スクリプトによる機能拡張を簡便に実現することができる。
Although one embodiment of the present invention has been described above, this embodiment may of course be modified as follows.
(1) Although the application example of the present invention to the router has been described in the above embodiment, the present invention may of course be applied to a switching hub. In short, a function that is connected to the first and second communication networks and performs transfer control of data transmitted from one of the two communication networks to the other according to preset parameters, and a script execution function The present invention can be applied to any relay device provided. In addition, the application target of the present invention is not limited to a router or a switching hub, but includes a communication device (for example, a mobile communication terminal such as a smartphone) provided with a communication unit that performs data communication according to a preset parameter, A portable or stationary game machine, an electronic musical instrument, or a so-called information home appliance may be used. In short, a means for realizing a specific function in accordance with a preset parameter (a means corresponding to the transfer control means in FIG. 3B), a game machine is set by interpreting and executing a game program. An electronic device having means for controlling display of a game screen and sound output control according to a parameter, means for generating musical sound data according to a user operation and a set parameter in the case of an electronic musical instrument, and a script If the electronic device includes an execution unit, the present invention is applied (that is, the customization unit is provided, and the script execution unit executes the script for expanding the function customized by the customization unit). The function expansion by can be realized easily.
例えば、ゲーム機に本発明を適用する場合には、ユーザにより設定された音量バランス(効果音、セリフおよびBGMの音量バランス)をゲームの種類毎に記憶し、ユーザにより実行を指示されたゲームの種類に応じて音量バランスを自動調整する処理を実現する機能拡張用スクリプトを用いることが考えられる。アクションゲームなどにおいては効果音やBGMの音量が大きいほうが好ましく、ロールプレイングゲームにいてはセリフの音量が大きい方が好ましいなど、最適な音量バランスはゲームの種類に応じて異なることが多い。その一方、実行するゲームを変える毎に音量バランスを規定するパラメータを逐一設定し直すことは煩わしい。上記機能拡張用スクリプトによる機能拡張を行えば、このような煩わしさを解消することができるからである。 For example, when the present invention is applied to a game machine, the volume balance (sound effect, speech and BGM volume balance) set by the user is stored for each game type, and the game is instructed to be executed by the user. It is conceivable to use a function expansion script that realizes the process of automatically adjusting the volume balance according to the type. In an action game or the like, it is preferable that the volume of sound effects or BGM is high, and in a role-playing game, it is preferable that the volume of speech is high, and the optimal volume balance often varies depending on the type of game. On the other hand, it is troublesome to reset the parameters that define the volume balance every time the game to be executed is changed. This is because such troublesomeness can be eliminated by performing function expansion using the function expansion script.
(2)上記実施形態では、転送制御処理、カスタマイズ処理およびスクリプト実行処理は何れも制御部100によって実行される。カスタマイズ処理については機能拡張用スクリプトの取得時にのみ実行されるため特に問題となることはないが、スクリプト実行処理の処理負荷が大きすぎると転送制御処理に支障が生じ、パケットロスが発生するなどの不具合が生じる虞がある。そこで、新たに追加される機能が常駐型のものである場合には、スクリプト実行処理による処理負荷が所定の閾値を上回らないようにその実行を制限する処理を制御部100に実行させるようにしても良い。また、転送制御処理の実行状況(すなわち、転送制御処理の処理負荷の大きさ)に応じて上記閾値を動的に更新するようにしても良い。例えば、転送制御処理の処理負荷が大きいほど上記閾値を小さくする(例えば、上記閾値をカスタマイズ処理において環境変数として設定しておき、転送制御処理の処理負荷に応じてその環境変数を更新する)のである。さらに、上記のような不具合が発生しないようにするため、ファームウェアを実行する手段と、カスタマイズ処理およびスクリプト実行処理を実行する手段とを各々別個に設けても良い。
(2) In the above embodiment, the transfer control process, the customization process, and the script execution process are all executed by the
(3)上記実施形態では、中継装置10配下のパーソナルコンピュータPC1にサンプルスクリプト配信装置20からサンプルスクリプトをダウンロードさせ、当該パーソナルコンピュータPC1から中継装置10にサンプルスクリプトを与える場合について説明した。しかし、要求メッセージQ120に代えて、サンプルスクリプトのダウンロードを指示する通信メッセージをパーソナルコンピュータPC1から中継装置10へ送信し、この通信メッセージの受信を契機として中継装置10の制御部100にサンプルスクリプト配信装置20からのサンプルスクリプトの取得(ダウンロード)を行わせ、当該サンプルスクリプトを対象としてカスタマイズ処理およびスクリプト実行処理を実行させるようにしても良い。また、中継装置10と通信して設定ファイル144cを取得し、設定ファイル144cに含まれているパラメータに応じたカスタマイズをサンプルスクリプトに施して中継装置10用の機能拡張用スクリプトを生成するスクリプト生成装置を中継装置10とは別個に通信システム1に設けても良い。例えば、サンプルスクリプト配信装置20に上記スクリプト生成装置の役割を兼ねさせても良く、また、中継装置10配下のパーソナルコンピュータに上記スクリプト生成装置の役割を兼ねさせても良い。
(3) In the above embodiment, a case has been described in which a sample script is downloaded from the sample
例えば、サンプルスクリプト配信装置20に上記スクリプト生成装置の役割を兼ねさせる場合には、中継装置10から設定ファイル144cを取得し、要求メッセージQ120のペイロード部に当該設定ファイル144cを追記して送信する処理をパーソナルコンピュータPC1に実行させ、当該設定ファイル144cを参照してカスタマイズした機能拡張用スクリプトを応答メッセージR120に書き込んで返信する処理をサンプルスクリプト配信装置20に実行させるようにすれば良い。また、当該サンプルスクリプト配信装置20によるスクリプト配信態様として、サンプルスクリプトをそのまま配信する態様と、カスタマイズ済の機能拡張用スクリプトを配信する態様の2種類を用意し、前者については無料で中継装置10のユーザに利用させる一方、後者については有料で利用させるようにすることも考えられる。なお、有料サービスの利用が可能なユーザであるか否かについては、要求メッセージQ110(或いはQ120)の受信時にユーザ認証を行って判定するようにすれば良い。一方、中継装置10配下のパーソナルコンピュータに上記スクリプト生成装置の役割を兼ねさせる場合には、例えばUSBメモリなどの外部記憶装置にサンプルスクリプトを書き込んでおき、当該外部記憶装置を当該パーソナルコンピュータに接続することでサンプルスクリプトを与えるようにしても良い。
For example, when the sample
(4)上記実施形態では、パラメータ定義データとして、各パラメータを示すものとしてサンプルスクリプトに書き込まれている識別子と、それらパラメータの具体的な設定値と対応付けて設定ファイル144cに書き込まれている識別子とを対応づけたデータを用いた。しかし、各パラメータを示すものとしてサンプルスクリプトを記述する際に用いる識別子として、設定ファイル144cにおけるものと同一のものを用いる場合には、サンプルスクリプトとともにパラメータ定義データを配信する必要はない。また、サンプルスクリプトに含まれる識別子は、設定ファイル144cにて規定されている何れかのパラメータを示すものには限定されず、これらパラメータの相互の関係に応じて算出される新たなパラメータを示すものであっても良い。このようなパラメータの一例としては、例えば機能拡張用スクリプトによりフィルタリング機能(例えば、支店側LANに含まれるパーソナルコンピュータによる外部へのアクセスを禁止する機能)を中継装置10に付与する際に、フィルタリング対象の装置を中継装置10に識別させるためのパラメータが挙げられる。このようなパラメータは、設定ファイル144cには直接格納されてはいないが、支店側LANのLANインタフェース番号を設定ファイル144cを参照して特定し、さらに当該LANインタフェース番号の示すLANインタフェースに対応するDHCP設定番号を参照することで、フィルタリング対象の装置を中継装置10に識別させるためのパラメータを特定することができる。
(4) In the above embodiment, as parameter definition data, identifiers written in the sample script as indicating each parameter, and identifiers written in the
また、パラメータ定義データにおいて、転送制御処理を規定するパラメータの設定内容に応じて定まる新たなパラメータに対応する識別子に、当該新たなパラメータの値についての各々異なる算出方法を示す複数のデータを対応付けておいても良い。ここで、複数種の算出方法の一例としては、フィルタリング対象の装置を中継装置10に識別させるためのパラメータの特定のように、中継装置10に設定済みのパラメータを相互に突合せ、その突合せ結果に基づいて新たなパラメータ値を算出(或いは、特定)する方法や、中継装置10を介して実行されたデータ通信の流れを解析して新たなパラメータ値を算出(或いは、特定)する方法が挙げられる。中継装置に設定済みのパラメータの相互の関係からは新たなパラメータの値を特定できない場合であっても、データ通信の流れに着目すれば当該パラメータの値を特定できるといったことは起こり得る。このため、新たなパラメータの値についての各々異なる算出方法を示す複数のデータをパラメータ定義データに含めておき、これら複数種の方法を順次制御部100に実行させることで、新たなパラメータの値を全く算出できないといった不具合の発生頻度を低減させることができると期待される。
Also, in the parameter definition data, a plurality of data indicating different calculation methods for the value of the new parameter are associated with the identifier corresponding to the new parameter determined according to the setting contents of the parameter that defines the transfer control process. You can keep it. Here, as an example of a plurality of types of calculation methods, the parameters already set in the
(5)上記実施形態では、中継装置10に付与する新たな機能における処理手順の全てを機能拡張用スクリプトにて規定するのではなく、所定の通信装置へpingを送信する機能や所定の宛先へ電子メールを送信する機能など中継装置での利用頻度が高いと考えられる機能を実現するスクリプトを関数化してライブラリを作成し、これらライブラリに含まれている関数を呼び出すためのインタフェース(所謂API:Application Programming Interface)を用意しておいても良い。このようなライブラリの提供、およびAPIの公開を行うことで、所定の通信装置へpingを送信する機能を実現するためのスクリプトを逐一記述する必要がなくなり、サンプルスクリプトや機能拡張用スクリプトの作成が容易になる。なお、上記各関数についてはスクリプト言語でその処理手順を記述しても良く、また、C言語や機械語などでその処理手順を記述しても良い。
(5) In the above embodiment, the processing procedure for the new function to be given to the
(6)上記実施形態では、中継装置10の機能を拡張するためのスクリプトの記述言語としてLuaを用いたが、制御部100の処理能力や記憶部140の記憶容量に余裕がある場合には、PerlやJava(登録商標)などの他のスクリプト言語を用いても勿論良い。また、機能拡張用スクリプトの記述に用いるスクリプト言語は、所謂インタプリタタイプのものには限定されず、コンパイルにより実行形式ファイルが生成されるものであっても良い。例えば、機能拡張用スクリプトのサンプルソースコードをサンプルスクリプト配信装置20から中継装置10へダウンロードし、中継装置10内で当該サンプルソースコードをコンパイルして実行形式ファイルを生成し、この実行形式ファイルを実行することで機能拡張を実現するのである。この場合、サンプルソースコードにカスタマイズ可能なパラメータを含ませておき、コンパイルの前処理として当該パラメータをカスタマイズする処理を制御部100に実行させるようにすれば良い。また、サンプルスクリプト配信装置20から中継装置10へ実行形式ファイルをダウンロードし、この実行形式ファイルを中継装置10の制御部100に実行させる場合には、カスタマイズ可能なパラメータの値をAPIにより逐次取得する仕組みを設けておくとともに当該APIを中継装置10に実装しておけば良い。
(6) In the above embodiment, Lua is used as the script description language for extending the function of the
(7)上記実施形態では、取得を所望するサンプルスクリプトをユーザに選択させるユーザインタフェース手段の役割を、中継装置10と通信するパーソナルコンピュータに担わせた。しかし、このようなユーザインタフェース手段を中継装置10に設けても良い。具体的には、図4に示す設定メニュー画面を表示する表示部(例えば、液晶ディスプレイ)と、ユーザに各種指示を入力させるための操作部とよりなるユーザインタフェース手段を中継装置10に設けるようにすれば良い。
(7) In the above embodiment, the personal computer that communicates with the
(8)上記実施形態では、中継装置10の特徴を顕著に示す転送制御処理、カスタマイズ処理およびスクリプト実行処理をソフトウェアで実現した。しかし、転送制御処理を実行する転送制御手段、カスタマイズ処理を実行するカスタマイズ手段およびスクリプト実行処理を実行するスクリプト実行手段の各々を電子回路などのハードウェアで実現し、これら各手段と、第1通信I/F部110と、第2通信I/F部120とを組み合わせて中継装置を構成しても勿論良い。また、上述した実施形態では、機能拡張プログラム144bを通信制御プログラム144aとは別個のプログラムとしたが、両者を一体のプログラムとし当該プログラムをファームウェアとして中継装置10の不揮発性記憶部144に格納しておいても良い。また、CD−ROMなどのコンピュータ読み取り可能な記録媒体に上記ファームウェアを書き込んで配布しても良く、インターネットなどの電気通信回線経由のダウンロードにより上記ファームウェアを配布しても良い。
(8) In the above embodiment, the transfer control process, the customization process, and the script execution process that clearly show the characteristics of the
1…通信システム、10…中継装置、20…サンプルスクリプト配信装置、100…制御部、110…第1通信I/F部、120…第2通信I/F部、130…外部機器I/F部、140…記憶部、142…揮発性記憶部、144…不揮発性記憶部、144a…通信制御プログラム、144b…機能拡張プログラム、144c…設定ファイル、150…バス、PC1、PC2、PC3…パーソナルコンピュータ。
DESCRIPTION OF
Claims (5)
所定のスクリプト言語で記述されたスクリプトを実行するスクリプト実行手段と、
電子機器に新たな機能を実現させるための処理手順の前記スクリプト言語による記載例であるサンプルスクリプトを取得し、前記パラメータの設定内容に応じたカスタマイズを当該サンプルスクリプトに施して自装置用の機能拡張用スクリプトを生成するカスタマイズ手段と、を備え、
前記スクリプト実行手段は、前記カスタマイズ手段により生成された機能拡張用スクリプトを実行する
ことを特徴とする電子機器。 In an electronic device having means for realizing a function specific to the electronic device according to a preset parameter,
Script execution means for executing a script described in a predetermined script language;
Acquire a sample script, which is a description example in the script language of a processing procedure for realizing a new function in the electronic device, and customize the sample script according to the setting contents of the parameter to expand the function for the own device Customizing means for generating scripts for use,
The electronic device characterized in that the script execution means executes a function expansion script generated by the customization means.
ことを特徴とする請求項1に記載の電子機器。 If the sample script includes a comment character string that prompts the user to set a new parameter prior to the execution of the function expansion script generated by customizing the sample script, the customization unit includes In the customization, the comment character string is deleted from the sample script, and a process for setting a new parameter according to the comment character string is executed prior to the execution of the function expansion script by the script execution means. The electronic device according to claim 1.
前記カスタマイズ手段は、前記ユーザインタフェース手段を介してユーザにより取得を指示されたサンプルスクリプトを取得する
ことを特徴とする請求項1〜3の何れか1項に記載の電子機器。 Comprising user interface means for allowing a user to select a sample script desired to be obtained;
The electronic device according to claim 1, wherein the customization unit acquires a sample script instructed to be acquired by a user via the user interface unit.
前記電子機器に新たな機能を実現させるための処理手順の前記スクリプト言語による記載例であるサンプルスクリプトに、前記取得手段により取得したパラメータに応じたカスタマイズを施して前記電子機器用の機能拡張用スクリプトを生成する生成手段と、
を有することを特徴とするスクリプト生成装置。
An electronic device that realizes a specific function according to a preset parameter, and communicates with the electronic device having a function of executing a script described in a predetermined script language via a communication network, and acquires the parameter Acquisition means to
A script for function expansion for the electronic device by applying customization according to the parameter acquired by the acquisition unit to the sample script that is a description example in the script language of a processing procedure for realizing a new function in the electronic device Generating means for generating
A script generation device characterized by comprising:
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013059584A JP6064720B2 (en) | 2013-03-22 | 2013-03-22 | Electronic device and script generation device |
CN201480017483.4A CN105074661B (en) | 2013-03-22 | 2014-03-19 | Electronic equipment and script generation device |
PCT/JP2014/057616 WO2014148581A1 (en) | 2013-03-22 | 2014-03-19 | Electronic apparatus and script generation device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013059584A JP6064720B2 (en) | 2013-03-22 | 2013-03-22 | Electronic device and script generation device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014186432A true JP2014186432A (en) | 2014-10-02 |
JP6064720B2 JP6064720B2 (en) | 2017-01-25 |
Family
ID=51580253
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013059584A Active JP6064720B2 (en) | 2013-03-22 | 2013-03-22 | Electronic device and script generation device |
Country Status (3)
Country | Link |
---|---|
JP (1) | JP6064720B2 (en) |
CN (1) | CN105074661B (en) |
WO (1) | WO2014148581A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019117024A1 (en) * | 2017-12-11 | 2019-06-20 | 日本電気株式会社 | Control method, control device, control system and recording medium |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107070712B (en) * | 2017-04-05 | 2019-08-13 | 中国联合网络通信集团有限公司 | Network side method for developing functions and network side server |
CN109460351B (en) * | 2018-12-16 | 2021-08-10 | 西南电子技术研究所(中国电子科技集团公司第十研究所) | Method for debugging electronic product process script by running ATS software platform |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11305998A (en) * | 1998-04-16 | 1999-11-05 | Hitachi Ltd | Computer system |
JP2011048702A (en) * | 2009-08-27 | 2011-03-10 | Yamaha Corp | Electronic apparatus, communication control apparatus and program |
JP2011060035A (en) * | 2009-09-10 | 2011-03-24 | Hitachi Solutions Ltd | System, method and program for deploying application |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8091071B2 (en) * | 2006-08-21 | 2012-01-03 | Sap, Ag | Method and system for template-based code generation |
-
2013
- 2013-03-22 JP JP2013059584A patent/JP6064720B2/en active Active
-
2014
- 2014-03-19 WO PCT/JP2014/057616 patent/WO2014148581A1/en active Application Filing
- 2014-03-19 CN CN201480017483.4A patent/CN105074661B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11305998A (en) * | 1998-04-16 | 1999-11-05 | Hitachi Ltd | Computer system |
JP2011048702A (en) * | 2009-08-27 | 2011-03-10 | Yamaha Corp | Electronic apparatus, communication control apparatus and program |
JP2011060035A (en) * | 2009-09-10 | 2011-03-24 | Hitachi Solutions Ltd | System, method and program for deploying application |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019117024A1 (en) * | 2017-12-11 | 2019-06-20 | 日本電気株式会社 | Control method, control device, control system and recording medium |
Also Published As
Publication number | Publication date |
---|---|
WO2014148581A1 (en) | 2014-09-25 |
CN105074661A (en) | 2015-11-18 |
CN105074661B (en) | 2018-12-11 |
JP6064720B2 (en) | 2017-01-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4869831B2 (en) | ADAPTER GENERATION DEVICE, METHOD, AND PROGRAM | |
EP3197094B1 (en) | Software upgrading method and device | |
EP2724231A1 (en) | A method of provisioning a cloud-based render farm | |
JP6064720B2 (en) | Electronic device and script generation device | |
JP5297555B1 (en) | Network system | |
JP2016539410A (en) | Application name correction method, apparatus, and storage medium | |
CN109408090B (en) | Upgrading method of equipment software, data converter and readable storage medium | |
US20160149987A1 (en) | Methods, systems, and computer readable media for automatic generation of programming-language-neutral representation of web application protocol interactions that implement network test | |
JP5729039B2 (en) | Information processing system, server device, client terminal, installation method, program, printer driver, and recording medium | |
WO2009110719A2 (en) | Method and apparatus for software lifecycle management in home network | |
CN112402944A (en) | Cloud game publishing method, platform, electronic equipment and storage medium | |
JP2014110041A (en) | Application creation support server, program, and network system | |
CN109962914A (en) | A kind of firewall configuration method and device | |
KR100524588B1 (en) | succeeding method of data in mobile | |
JP2005173865A (en) | Method for specifying owner of network apparatus | |
US8347314B2 (en) | Method for managing java applications | |
JP5540951B2 (en) | Apparatus, system, method, and program for collecting information | |
JP2011048702A (en) | Electronic apparatus, communication control apparatus and program | |
JP5958626B2 (en) | Communication control device and program | |
CN112511321B (en) | Method and device for configuring 5G core network | |
CN106254909B (en) | Distribution, operation method and the device of interaction content | |
CN112087327A (en) | Information state acquisition method and apparatus, storage medium, and electronic apparatus | |
JP4004993B2 (en) | Remote control method, server device, and virtual machine program | |
JP6233460B2 (en) | Communication control device | |
JP5835362B2 (en) | Communication control device and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160120 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160830 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20161027 |
|
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: 20161122 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20161205 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6064720 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |