JP2014186432A - Electronic apparatus and script generation device - Google Patents

Electronic apparatus and script generation device Download PDF

Info

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
Application number
JP2013059584A
Other languages
Japanese (ja)
Other versions
JP6064720B2 (en
Inventor
剛 ▲高▼澤
Go Takazawa
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.)
Yamaha Corp
Original Assignee
Yamaha Corp
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 Yamaha Corp filed Critical Yamaha Corp
Priority to JP2013059584A priority Critical patent/JP6064720B2/en
Priority to CN201480017483.4A priority patent/CN105074661B/en
Priority to PCT/JP2014/057616 priority patent/WO2014148581A1/en
Publication of JP2014186432A publication Critical patent/JP2014186432A/en
Application granted granted Critical
Publication of JP6064720B2 publication Critical patent/JP6064720B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45508Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation
    • G06F9/45512Command shells

Abstract

PROBLEM TO BE SOLVED: To allow a user of an electronic apparatus to expand features of the electronic apparatus using a script for feature expansion, even when the user does not have knowledge of the script language and debug.SOLUTION: The electronic apparatus includes: script execution means that executes a script described in prescribed script language; and customization means that acquires, as a description example in the script language, a sample script of a processing procedure for causing the electronic apparatus to implement a new function, customizes it according to a setup content of parameters for causing the electronic apparatus to implement a unique function, and generates and stores the feature expansion script of the self apparatus. The script execution means executes the feature expansion script generated by the customization means.

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.

特表平10−500510号公報Japanese National Patent Publication No. 10-500510

機能拡張用スクリプトを用いて中継装置の機能拡張を行う場合、中継装置のユーザは、所望の機能を中継装置に実現させるための機能拡張用スクリプトを作成するなど、機能拡張用スクリプトを自分で用意する必要がある。しかし、機能拡張用スクリプトを作成することは、一般的なユーザにとっては難しい場合が多い。機能拡張用スクリプトを作成するには、その記述に用いるスクリプト言語についての知識やアルゴリズムについての知識が必要となるからである。   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. Patent Document 1 discloses a technique that allows a task to be automatically executed by a computer to be easily defined via an interactive user interface. However, the technique disclosed in Patent Document 1 uses a sample script. It is not a technique for customizing and generating a function expansion script, but is a completely different invention from the present invention.

ところで、サンプルスクリプトには、当該サンプルスクリプトをカスタマイズして生成される機能拡張用スクリプトの実行に先立って新たなパラメータを設定することを促すコメント(機能拡張用スクリプトのソースコードの閲覧者に宛てた注意書き)を表す文字列(以下、コメント文字列)が含まれている場合がある。このようなサンプルスクリプトをユーザが手作業でカスタマイズして機能拡張用スクリプトを生成し、電子機器に実行させる場合には、そのカスタマイズの際にコメント文字列を削除し、さらに機能拡張用スクリプトの実行開始に先立ってそのコメント文字列の表すコメントにしたがったパラメータ設定を行っておく必要があった。そこで、サンプルスクリプトに、当該サンプルスクリプトをカスタマイズして生成される機能拡張用スクリプトの実行に先立って新たなパラメータを設定することを促すコメント文字列が含まれている場合には、カスタマイズの際に当該コメント文字列を削除し、スクリプト実行手段による機能拡張用スクリプトの実行に先立って当該コメント文字列の表すコメントにしたがって新たなパラメータを設定する処理をカスタマイズ手段に実行させるようにすれば良い。このような態様によれば、スクリプト言語やアルゴリズムに関する知識、デバッグ技術を有していないことは勿論、新たなパラメータの設定などの環境設定に関する知識も有していないユーザであっても、機能拡張用スクリプトを用いて、自身の利用する電子機器の機能拡張を実現することが可能になる。   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.

本発明に係る電子機器の一実施形態である中継装置10を含む通信システム1の構成例を示す図である。It is a figure which shows the structural example of the communication system 1 containing the relay apparatus 10 which is one Embodiment of the electronic device which concerns on this invention. サンプルスクリプト配信装置20に記憶されているサンプルスクリプトの一例を示す図である。3 is a diagram illustrating an example of a sample script stored in a sample script distribution device 20. FIG. 中継装置10の構成例を示すブロック図である。3 is a block diagram illustrating a configuration example of a relay device 10. FIG. 中継装置10に対して各種設定作業を行うためのコンピュータ装置の表示部に表示される設定メニュー画面の一例を示す図である。It is a figure which shows an example of the setting menu screen displayed on the display part of the computer apparatus for performing various setting work with respect to the relay apparatus. 通信システム1における通信シーケンスの一例を示す図である。2 is a diagram illustrating an example of a communication sequence in the communication system 1. FIG. 中継装置10に付与される新規機能である通信状態監視機能における処理の流れを示すフローチャートである。4 is a flowchart showing a flow of processing in a communication state monitoring function which is a new function given to the relay device 10.

以下、図面を参照しつつ本発明の一実施形態について説明する。
図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 communication system 1 including a relay device 10 according to an embodiment of the present invention. The communication system 1 is an information system in a company, for example. This communication system 1 is configured by connecting a head office LAN (Local Area Network) laid in the head office of the above company and a branch side LAN laid in a branch of the same company to a wide area network such as the Internet. . As shown in FIG. 1, the head office LAN is connected to a wide area network via a relay device such as a router, and the branch side LAN is connected to a wide area network via a relay device 10.

中継装置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 relay device 10 is, for example, a router, and is connected between the personal computer PC1 or PC2 connected to the branch side LAN and the WWW server device connected to the Internet or the PC3 connected to the head office side LAN. It performs transfer control of data transmitted and received in accordance with IP (Transport Control Protocol / Internet Protocol). In the relay device 10, the transfer control is realized by operating a control unit configured by a CPU or the like according to firmware. Further, the relay apparatus 10 has a script execution function for executing a script described using a predetermined script language (Lua in the present embodiment). For this reason, the user of the relay apparatus 10 causes the relay apparatus 10 to execute a function expansion script describing a processing procedure for realizing a new function in the relay apparatus 10 in the script language. Can be extended. The reason why Lua is adopted as the script language in the present embodiment is that the processing load of script execution processing is small compared to other script languages such as Perl and Java (registered trademark), and it is suitable for incorporation into a router. .

中継装置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 script distribution device 20 connected to the wide area network. it can. The sample script distribution device 20 is a WWW server device that is operated and managed by a company that manufactures and sells the relay device 10. The sample script distribution device 20 stores in advance a sample script created by the manufacturer / seller. FIG. 2A is a diagram illustrating an example of a sample script stored in the sample script distribution device 20. In this sample script, various parameters for defining data transfer control in the relay device (LAN interface number and IP address range assigned to the personal computer under the LAN interface (for example, communication to each personal computer by DHCP) When assigning an address, an identifier indicating the parameter is described in place of a specific value of the parameter at a location where the DHCP scope setting number) is quoted.

例えば、図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 script distribution device 20 cannot be directly executed by the relay device 10 as a function expansion script. Conventionally, the user of the relay apparatus 10 uses a text editor or the like to rewrite each identifier in the sample script with the value of the corresponding parameter, deletes the comment character string, and adds a parameter indicated by the comment character string. I had to do the work.

例えば、ローカルネットワーク側の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 relay device 10. There wasn't. However, as described above, these operations are difficult for general users. On the other hand, in the present embodiment, the relay device 10 is caused to execute processing for rewriting the sample script according to the parameter that defines data transfer control in the own device, deletion of the comment character string, and additional setting indicated by the comment character string. This solves the above problem.
Hereinafter, the relay apparatus 10 that clearly shows the features of the present embodiment will be mainly described.

図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 relay device 10.
As illustrated in FIG. 3A, the relay device 10 includes a control unit 100, a first communication interface (hereinafter “I / F”) unit 110, a second communication I / F unit 120, and an external device I / F unit 130. , A storage unit 140, and a bus 150 that mediates data exchange between these components. The control unit 100 is a CPU, and executes a program stored in the storage unit 140 (more precisely, the non-volatile storage unit 144 included in the storage unit 140) as a control center of the relay device 10. Function. Although details will be described later, in the present embodiment, two types of programs, that is, a communication control program 144a that is firmware of the relay apparatus 10 and a function expansion program 144b are stored in the nonvolatile storage unit 144 in advance.

第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 / F unit 110 is a NIC (Network Interface Card), and is connected to the branch side LAN in FIG. The first communication I / F unit 110 receives a packet transmitted from the branch side LAN and delivers it to the control unit 100, while sending a packet delivered from the control unit 100 to the branch side LAN. Similarly to the first communication I / F unit 110, the second communication I / F unit 120 is a NIC and is connected to a wide area network. The second communication I / F unit 120 receives a packet transmitted from the wide area network and delivers the packet to the control unit 100, while transmitting the packet received from the control unit 100 to the wide area network.

外部機器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 / F unit 130 exchanges data with an external storage medium such as a USB (Universal Serial Bus) memory or an external device such as a serial console according to a predetermined protocol (USB or RS-232C). belongs to. For example, when a USB memory is used as an external device, the external device I / F unit 130 may be configured with a USB interface. When a serial console is used as an external device, an external device is used with a serial interface such as an RS-232C interface. The device I / F unit 130 may be configured. The external device I / F unit 130 is for giving various instructions and data to the relay apparatus 10 from an external device connected to the external device I / F unit 130.

記憶部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 storage unit 140 includes a volatile storage unit 142 and a nonvolatile storage unit 144 as shown in FIG. The volatile storage unit 142 is, for example, a RAM (Random Access Memory), and is used by the control unit 100 as a work area when executing various programs. The volatile storage unit 142 stores data (for example, a routing table) that is referred to when performing data transfer control. On the other hand, the nonvolatile storage unit 144 is a hard disk or a flash memory. As shown in FIG. 3A, in the nonvolatile storage unit 144, in addition to the communication control program 144a and the function expansion program 144b described above, a setting menu screen for setting the operation of the relay device 10 using a browser is displayed. HTML data to be represented (not shown in FIG. 3A) and a setting file 144c are stored. When a serial console is connected to the external device I / F unit 130 and operation setting is performed by operating the serial console, the HTML data need not be stored in the nonvolatile storage unit 144.

図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 relay device 10. On the setting menu screen shown in FIG. 4, by clicking the virtual buttons B01, B02, and B03 with a mouse, etc., it is possible to instruct minimization, maximization, and destruction of the setting menu screen as in the case of a general browser screen. .

図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 control unit 100 of the relay device 10 according to the communication control program 144a are arranged. Each of these setting items includes a parameter. Are associated with link information for instructing the control unit 100 to change the information. On the setting menu screen shown in FIG. 4, by clicking these setting items with a mouse, etc., the control unit 100 is instructed to change the corresponding setting items in the same manner as in a general browser screen, and the corresponding parameters are updated. Can be made.

図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 relay apparatus 10 is displayed using an inline frame or the like. More specifically, the function expansion menu is displayed according to the HTML data downloaded from the sample script distribution device 20 separately from the HTML data downloaded from the relay device 10. The sample script distribution device 20 stores HTML data representing a function expansion menu for a sample of a function expansion script that can be distributed by the sample script distribution device 20. The HTML data stored in the non-volatile storage unit 144 of the relay device 10 is embedded with link information that instructs the browser to which the HTML data is downloaded to download the HTML data of the function expansion menu. . The personal computer that has downloaded the HTML data of the setting menu screen from the relay device 10 downloads the HTML data of the function expansion menu from the sample script distribution device 20 according to the link information embedded in the HTML data, and obtains the HTML data. As a trigger, the setting menu screen shown in FIG. 4 is displayed. Therefore, when a company that manufactures and sells the relay device 10 starts distributing a new sample script, the sample script is stored in the sample script distribution device 20, and information about the sample script is posted. What is necessary is just to update the HTML data of the function expansion menu to the thing, without updating the HTML data (HTML data of the setting menu screen) stored in the relay device 10, or updating the firmware of the relay device 10. The new function can be used by the user of the relay device 10.

図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 script distribution apparatus 20 Radio buttons for enabling the function and detailed explanation of the function are posted. The radio button for instructing the user to use the extended function is associated with link information to a sample of a script for function expansion that causes the control unit 100 to realize the extended function, and the radio button is clicked with a mouse or the like. Can instruct to download the sample script. A personal computer that is instructed to download a sample script of a new function by operating the function expansion menu accesses the sample script distribution device 20 according to the link information and downloads the corresponding sample script. Then, the personal computer transmits the sample script to the HTML data distribution source (the relay apparatus 10 in this embodiment) on the setting menu screen, and instructs to customize and execute it.

設定ファイル144cには、中継装置10におけるデータ転送制御を規定する各種パラメータ(前述したLANインタフェース番号等)を示す識別子に対応づけて、当該パラメータの具体的な設定値が書き込まれている。なお、機能拡張用スクリプトの実行に先立って新たなパラメータを設定する必要がある場合には、当該新たなパラメータの設定値をそのパラメータを示す識別子と対応づけて設定ファイル144cに追記すれば良い。通信制御プログラム144aは、支店側LANと本社側LANの何れか一方から他方へと送信されたデータの転送制御を設定ファイル144cに書き込まれた各種パラメータにしたがって実行する転送制御処理を制御部100に実行させるプログラムである。制御部100は、中継装置10の電源投入を契機として通信制御プログラム144aの実行を開始し、以降、上記転送制御処理を実行する転送制御手段(図3(b))として機能する。この通信制御プログラム144aにしたがって実行される転送制御処理については、従来のルータにおけるものと特段に変わるところはないため、詳細な説明を省略する。   In the setting file 144c, specific setting values of the parameters are written in association with identifiers indicating various parameters (such as the LAN interface number described above) that define data transfer control in the relay apparatus 10. When it is necessary to set a new parameter prior to the execution of the function expansion script, the setting value of the new parameter may be added to the setting file 144c in association with an identifier indicating the parameter. The communication control program 144a causes the control unit 100 to execute transfer control processing for executing transfer control of data transmitted from one of the branch side LAN and the head office side LAN to the other according to various parameters written in the setting file 144c. It is a program to be executed. The control unit 100 starts execution of the communication control program 144a when the relay device 10 is turned on, and functions as transfer control means (FIG. 3B) for executing the transfer control processing. The transfer control process executed in accordance with the communication control program 144a is not particularly different from that in the conventional router, and thus detailed description thereof is omitted.

機能拡張プログラム144bは、カスタマイズ処理およびスクリプト実行処理を制御部100に実行させるプログラムである。本実施形態では、機能拡張プログラム144bについても中継装置10の電源投入を契機としてその実行が開始される。制御部100は機能拡張プログラム144bを実行することにより、図3(b)に示すように、カスタマイズ処理を実行するカスタマイズ手段として機能するとともに、スクリプト実行処理を実行するスクリプト実行手段として機能する。   The function expansion program 144b is a program that causes the control unit 100 to execute customization processing and script execution processing. In the present embodiment, the execution of the function expansion program 144b is also started when the relay device 10 is turned on. By executing the function expansion program 144b, the control unit 100 functions as a customization unit that executes the customization process and also functions as a script execution unit that executes the script execution process, as illustrated in FIG. 3B.

カスタマイズ処理は、サンプルスクリプトと当該サンプルスクリプトと対になるパラメータ定義データとを配下のパーソナルコンピュータから受信したことを契機としてその実行が開始される処理である。パラメータ定義データとは、サンプルスクリプトとともにサンプルスクリプト配信装置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 script distribution device 20 together with the sample script, and an identifier included in the sample script distributed together with the parameter definition data is associated with each parameter stored in the setting file 144c. It is data. As a specific example of such parameter definition data, data in which an identifier included in the sample script is associated with an identifier written in the setting file 144c in association with a specific setting value of the parameter indicated by the identifier. Is mentioned.

カスタマイズ処理では、制御部100は、パラメータ定義データにしたがって、サンプルスクリプトに含まれている識別子を設定ファイル144cに格納されているパラメータの値に置き換えて自装置用の機能拡張用スクリプトを生成し不揮発性記憶部144に格納する。なお、サンプルスクリプトに、新たなパラメータの設定を促すコメント文字列(図2(a)に示す例では、@CHG@以降の各行)が含まれている場合には、制御部100は、当該コメント文字列にしたがって設定ファイル144cに新たなパラメータを追記する処理、および上記識別子とパラメータとの置き換えを施したスクリプトから当該コメント文字列を削除する処理も実行する。
以上がカスタマイズ処理の内容である。
In the customization process, the control unit 100 generates a function expansion script for its own device by replacing the identifier included in the sample script with the parameter value stored in the setting file 144c in accordance with the parameter definition data. Stored in the sex storage unit 144. If the sample script includes a comment character string that prompts the user to set a new parameter (in the example shown in FIG. 2A, each line after @ CHG @), the control unit 100 determines that the comment A process of adding a new parameter to the setting file 144c according to the character string and a process of deleting the comment character string from the script in which the identifier and the parameter are replaced are also executed.
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 relay device 10.

次いで、中継装置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 relay device 10. When it is desired to expand the function of the relay device 10, the user starts a WWW browser on a personal computer (in this operation example, personal computer PC1) connected to the branch side LAN, and issues an instruction to download HTML data on the setting menu screen. give. The control unit of the personal computer PC1 transmits a request message Q100 requesting downloading of the HTML data to the relay device 10 according to the instruction (see FIG. 5). When receiving the request message Q100, the control unit 100 of the relay device 10 reads the HTML data from the nonvolatile storage unit 144 and returns a response message R100 in which the HTML data is written in the payload portion (see FIG. 5).

パーソナルコンピュータ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 script distribution apparatus 20 according to the link information (see FIG. 5). When receiving the request message Q110, the control unit of the sample script distribution apparatus 20 returns a response message R110 in which HTML data representing the function expansion menu is written in the payload part (see FIG. 5). The control unit of the personal computer PC1 displays the setting menu screen shown in FIG. 4 on the display unit when the response message R110 is received and all the data necessary for displaying the setting menu screen is obtained (FIG. 5: Step S100). .

図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 script distribution device 20 receives the request message Q120, the sample script distribution device 20 reads the sample script requested to be downloaded by the request message Q120 and the parameter definition data paired with the sample script from the storage unit of the own device. A response message R120 in which the parameter definition data is written in the payload portion is returned.

パーソナルコンピュータ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 relay device 10.

中継装置10の制御部100は、要求メッセージQ130を受信すると、この要求ンメッセージQ130のペイロード部に書き込まれているサンプルスクリプトとパラメータ定義データを読み出し、前述したカスタマイズ処理S110(すなわち、サンプルスクリプトに含まれているパラメータを示す識別子を当該パラメータの設定値に書き換える処理、さらにコメント文字列の削除およびコメント文字列にしたがった新たなパラメータの設定を行う処理)を実行し、さらにカスタマイズ処理S110により生成した機能拡張用スクリプトを実行するスクリプト実行処理S120を実行する。これにより、ユーザにより中継装置10の機能拡張が実現される。   When receiving the request message Q130, the control unit 100 of the relay apparatus 10 reads the sample script and parameter definition data written in the payload part of the request message Q130, and includes the above-described customization processing S110 (that is, included in the sample script). Generated by the customization process S110. The process of rewriting the identifier indicating the parameter being changed to the setting value of the parameter, the process of deleting the comment character string, and setting a new parameter according to the comment character string) A script execution process S120 for executing a function expansion script is executed. Thereby, the function expansion of the relay apparatus 10 is implement | achieved by the user.

ここで、機能拡張用スクリプトの実行により中継装置10に付与される新たな機能としては、常駐型の機能(当該機能を実現する処理手順に無限ループが含まれており、割り込み処理等により実行停止が指示されるまで処理を継続する機能)と、ターンアラウンド型の機能(処理結果の記憶や出力で処理を終了する機能)とが考えられる。例えば、ターンアラウンド型の機能の一例としては、設定ファイル144cの設定内容や中継装置10の稼動ログファイルを所定の出力先(外部機器I/F部130に接続されたシリアルコンソールやUSBメモリ、或いは支店側LANに接続されたパーソナルコンピュータ)に出力する機能が挙げられる。このような機能を付与することで、中継装置10に対する動作設定の設定内容や稼動ログのレポート出力が可能となり、中継装置10の運用管理がし易くなる、といった利点がある。   Here, as a new function given to the relay device 10 by executing the function expansion script, a resident function (an infinite loop is included in the processing procedure for realizing the function and the execution is stopped by interrupt processing or the like). And a turnaround type function (a function for ending the processing by storing or outputting the processing result). For example, as an example of the turnaround function, the setting contents of the setting file 144c and the operation log file of the relay device 10 are stored in a predetermined output destination (serial console or USB memory connected to the external device I / F unit 130, or And a function of outputting to a personal computer connected to the branch side LAN. By providing such a function, it is possible to output operation settings and operation log reports for the relay device 10, and it is easy to manage the operation of the relay device 10.

これに対して、常駐型の機能の一例としては、図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 relay device 10 at regular time intervals (600 seconds in this embodiment), and starts QoS (Quality of Service) according to the monitoring result. This is a function of notifying (or stopping) and the monitoring result to a predetermined destination. As shown in FIG. 6, this communication status monitoring function calculates the number of times a ping packet is transmitted to a gateway device (not shown) of the branch side LAN (step SA100) and the number of response packets received in response to these ping packets. Processing for controlling start and stop of QoS according to the packet loss rate (steps SA110, SA120, SA150 and SA160), and processing for notifying data indicating the monitoring result to a predetermined destination by e-mail or the like (step SA130) This is realized by sequentially executing a process of sleeping for 600 seconds (step SA140). As another specific example of the resident type function, whether or not a specific communication log is output to the operation log file is monitored, notification processing is executed when the specific communication log is output, and again A mode of sleeping until the specific communication log is output is also conceivable. In the case of a resident function, a script execution process is executed by the control unit 100 for a function expansion script that realizes the function every time the relay device 10 is turned on (or reset). You can make it.

上記通信状態監視機能を中継装置10に実現させる機能拡張用スクリプトのサンプルの一例としては、図6に示す処理手順をLuaにより記述したサンプルスクリプトが挙げられる。ここで、pingパケットをゲートウェイ装置へ送信する際には、ゲートウェイ装置の通信アドレスが必要となるのであるが、ゲートウェイ装置の通信アドレスは中継装置毎に異なることが一般的である。このため、サンプルスクリプトでは、ゲートウェイ装置の通信アドレスの具体的な値に換えて当該通信アドレスを示す識別子が記載されている。制御部100は、上記パラメータ定義データおよび設定ファイル144cを参照して上記識別子をゲートウェイ装置の通信アドレスに置き換え、自装置用の機能拡張用スクリプトを生成し実行するのである。   An example of a sample of a function expansion script that causes the relay apparatus 10 to realize the communication state monitoring function is a sample script in which the processing procedure shown in FIG. 6 is described in Lua. Here, when the ping packet is transmitted to the gateway device, the communication address of the gateway device is required, but the communication address of the gateway device is generally different for each relay device. For this reason, in the sample script, an identifier indicating the communication address is described instead of a specific value of the communication address of the gateway device. The control unit 100 refers to the parameter definition data and the setting file 144c, replaces the identifier with the communication address of the gateway device, and generates and executes a function expansion script for the device itself.

このように、本実施形態によれば、サンプルスクリプトを自装置用にカスタマイズして機能拡張用スクリプトを生成する処理が中継装置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 control unit 100 of the relay device 10, so that the user of the relay device 10 can execute the script. Even without knowledge about languages and algorithms and debugging technology, it is possible to perform function expansion of the relay device 10 using a function expansion script.

以上本発明の一実施形態について説明したが、この実施形態を以下のように変形しても勿論良い。
(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 control unit 100. The customization process is executed only when the function expansion script is acquired, so there is no problem. However, if the processing load of the script execution process is too large, the transfer control process will be hindered and packet loss will occur. There is a risk of malfunction. Therefore, when the newly added function is a resident type, the control unit 100 is caused to execute a process for limiting the execution so that the processing load of the script execution process does not exceed a predetermined threshold. Also good. Further, the threshold value may be dynamically updated according to the execution status of the transfer control process (that is, the processing load of the transfer control process). For example, the larger the processing load of the transfer control process, the smaller the threshold value (for example, the threshold value is set as an environment variable in the customization process, and the environment variable is updated according to the processing load of the transfer control process). is there. Furthermore, in order to prevent the above-described problems from occurring, a means for executing firmware and a means for executing customization processing and script execution processing may be provided separately.

(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 script distribution device 20 to the personal computer PC1 under the relay device 10 and the sample script is given to the relay device 10 from the personal computer PC1. However, instead of the request message Q120, a communication message for instructing the download of the sample script is transmitted from the personal computer PC1 to the relay apparatus 10, and upon reception of this communication message, the sample script distribution apparatus is sent to the control unit 100 of the relay apparatus 10. The sample script from 20 may be acquired (downloaded), and the customization process and the script execution process may be executed for the sample script. Also, a script generation device that communicates with the relay device 10 to obtain the setting file 144c, and customizes the sample script according to the parameters included in the setting file 144c to generate a function expansion script for the relay device 10 May be provided in the communication system 1 separately from the relay device 10. For example, the sample script distribution device 20 may serve as the script generation device, and the personal computer under the relay device 10 may serve as the script generation device.

例えば、サンプルスクリプト配信装置20に上記スクリプト生成装置の役割を兼ねさせる場合には、中継装置10から設定ファイル144cを取得し、要求メッセージQ120のペイロード部に当該設定ファイル144cを追記して送信する処理をパーソナルコンピュータPC1に実行させ、当該設定ファイル144cを参照してカスタマイズした機能拡張用スクリプトを応答メッセージR120に書き込んで返信する処理をサンプルスクリプト配信装置20に実行させるようにすれば良い。また、当該サンプルスクリプト配信装置20によるスクリプト配信態様として、サンプルスクリプトをそのまま配信する態様と、カスタマイズ済の機能拡張用スクリプトを配信する態様の2種類を用意し、前者については無料で中継装置10のユーザに利用させる一方、後者については有料で利用させるようにすることも考えられる。なお、有料サービスの利用が可能なユーザであるか否かについては、要求メッセージQ110(或いはQ120)の受信時にユーザ認証を行って判定するようにすれば良い。一方、中継装置10配下のパーソナルコンピュータに上記スクリプト生成装置の役割を兼ねさせる場合には、例えばUSBメモリなどの外部記憶装置にサンプルスクリプトを書き込んでおき、当該外部記憶装置を当該パーソナルコンピュータに接続することでサンプルスクリプトを与えるようにしても良い。   For example, when the sample script distribution device 20 also serves as the script generation device, the setting file 144c is acquired from the relay device 10, and the setting file 144c is added to the payload portion of the request message Q120 and transmitted. May be executed by the personal computer PC1, and the sample script distribution device 20 may be caused to execute a process of writing and returning the customized function expansion script in the response message R120 with reference to the setting file 144c. Also, two types of script distribution modes by the sample script distribution device 20 are prepared: a mode in which a sample script is distributed as it is and a mode in which a customized function expansion script is distributed. The former is free of charge for the relay device 10. It is also conceivable to allow the user to use the latter while paying for the latter. Whether or not the user can use the paid service may be determined by performing user authentication when receiving the request message Q110 (or Q120). On the other hand, when the personal computer under the relay device 10 also serves as the script generation device, a sample script is written in an external storage device such as a USB memory, and the external storage device is connected to the personal computer. A sample script may be given.

(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 setting file 144c in association with specific setting values of these parameters The data which matched was used. However, when the same identifier as that in the setting file 144c is used as an identifier used when describing the sample script to indicate each parameter, it is not necessary to distribute the parameter definition data together with the sample script. Further, the identifier included in the sample script is not limited to the one indicating any parameter defined in the setting file 144c, but indicates a new parameter calculated according to the mutual relationship between these parameters. It may be. As an example of such a parameter, for example, when a filtering function (for example, a function for prohibiting external access by a personal computer included in a branch side LAN) is given to the relay apparatus 10 by a function expansion script, the filtering target The parameters for causing the relay device 10 to identify these devices are listed. Such parameters are not directly stored in the setting file 144c, but the LAN interface number of the branch side LAN is specified with reference to the setting file 144c, and DHCP corresponding to the LAN interface indicated by the LAN interface number is specified. By referring to the setting number, it is possible to specify a parameter for causing the relay device 10 to identify the device to be filtered.

また、パラメータ定義データにおいて、転送制御処理を規定するパラメータの設定内容に応じて定まる新たなパラメータに対応する識別子に、当該新たなパラメータの値についての各々異なる算出方法を示す複数のデータを対応付けておいても良い。ここで、複数種の算出方法の一例としては、フィルタリング対象の装置を中継装置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 relay device 10 are matched with each other like the parameters for identifying the device to be filtered to the relay device 10, and the result of the matching is obtained. A method for calculating (or specifying) a new parameter value based on the above, and a method for calculating (or specifying) a new parameter value by analyzing the flow of data communication executed via the relay apparatus 10 are included. . Even if a new parameter value cannot be identified from the mutual relationship of parameters already set in the relay apparatus, it is possible that the parameter value can be identified by focusing on the data communication flow. For this reason, a plurality of data indicating different calculation methods for the new parameter values are included in the parameter definition data, and the control unit 100 sequentially executes the plurality of types of methods to obtain the new parameter values. It is expected that the occurrence frequency of defects that cannot be calculated at all can be reduced.

(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 relay device 10 is not specified by the function expansion script, but to a function for transmitting a ping to a predetermined communication device or to a predetermined destination An interface (so-called API: Application) for creating a library by making a script that realizes a function that is considered to be frequently used in a relay device, such as a function for sending an e-mail, into a function, and calling a function included in the library Programming Interface) may be prepared. By providing such a library and publishing an API, it is no longer necessary to write a script for realizing a function of transmitting a ping to a predetermined communication device, and a sample script and a function expansion script can be created. It becomes easy. The processing procedure for each function may be described in a script language, or the processing procedure may be described in a C language or a machine language.

(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 relay device 10. However, when the processing capacity of the control unit 100 and the storage capacity of the storage unit 140 are sufficient, Of course, other script languages such as Perl and Java (registered trademark) may be used. The script language used to describe the function expansion script is not limited to the so-called interpreter type, and an executable file may be generated by compilation. For example, the sample source code of the function expansion script is downloaded from the sample script distribution device 20 to the relay device 10, the sample source code is compiled in the relay device 10 to generate an executable format file, and the executable format file is executed By doing so, function expansion is realized. In this case, customizable parameters may be included in the sample source code, and processing for customizing the parameters may be executed by the control unit 100 as preprocessing for compilation. Further, when an execution format file is downloaded from the sample script distribution apparatus 20 to the relay apparatus 10 and the execution format file is executed by the control unit 100 of the relay apparatus 10, customizable parameter values are sequentially acquired by the API. It is only necessary to provide a mechanism and implement the API in the relay device 10.

(7)上記実施形態では、取得を所望するサンプルスクリプトをユーザに選択させるユーザインタフェース手段の役割を、中継装置10と通信するパーソナルコンピュータに担わせた。しかし、このようなユーザインタフェース手段を中継装置10に設けても良い。具体的には、図4に示す設定メニュー画面を表示する表示部(例えば、液晶ディスプレイ)と、ユーザに各種指示を入力させるための操作部とよりなるユーザインタフェース手段を中継装置10に設けるようにすれば良い。 (7) In the above embodiment, the personal computer that communicates with the relay apparatus 10 plays the role of user interface means that allows the user to select a sample script desired to be acquired. However, such user interface means may be provided in the relay device 10. Specifically, the relay apparatus 10 is provided with user interface means including a display unit (for example, a liquid crystal display) for displaying the setting menu screen shown in FIG. 4 and an operation unit for allowing the user to input various instructions. Just do it.

(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 relay device 10 are realized by software. However, each of the transfer control means for executing the transfer control processing, the customization means for executing the customization processing, and the script execution means for executing the script execution processing are realized by hardware such as an electronic circuit. Of course, the relay device may be configured by combining the I / F unit 110 and the second communication I / F unit 120. In the above-described embodiment, the function expansion program 144b is a separate program from the communication control program 144a. However, the program is stored in the nonvolatile storage unit 144 of the relay device 10 as a single program and the program as firmware. You can leave it. Further, the firmware may be written and distributed on a computer-readable recording medium such as a CD-ROM, or the firmware may be distributed by downloading via a telecommunication line such as the Internet.

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 SYMBOLS 1 ... Communication system, 10 ... Relay apparatus, 20 ... Sample script delivery apparatus, 100 ... Control part, 110 ... 1st communication I / F part, 120 ... 2nd communication I / F part, 130 ... External apparatus I / F part , 140, storage unit, 142, volatile storage unit, 144, nonvolatile storage unit, 144a, communication control program, 144b, function expansion program, 144c, setting file, 150, bus, PC1, PC2, PC3, personal computer.

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または請求項2に記載の電子機器。   3. The electronic apparatus according to claim 1, wherein the means for realizing the function unique to the electronic apparatus is a communication means for performing data communication via a communication network. 取得を所望するサンプルスクリプトをユーザに選択させるためのユーザインタフェース手段を備え、
前記カスタマイズ手段は、前記ユーザインタフェース手段を介してユーザにより取得を指示されたサンプルスクリプトを取得する
ことを特徴とする請求項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:

JP2013059584A 2013-03-22 2013-03-22 Electronic device and script generation device Active JP6064720B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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