JPWO2013145254A1 - Program, apparatus, and method for executing distributed processing - Google Patents
Program, apparatus, and method for executing distributed processing Download PDFInfo
- Publication number
- JPWO2013145254A1 JPWO2013145254A1 JP2014507217A JP2014507217A JPWO2013145254A1 JP WO2013145254 A1 JPWO2013145254 A1 JP WO2013145254A1 JP 2014507217 A JP2014507217 A JP 2014507217A JP 2014507217 A JP2014507217 A JP 2014507217A JP WO2013145254 A1 JPWO2013145254 A1 JP WO2013145254A1
- Authority
- JP
- Japan
- Prior art keywords
- variable
- synchronization
- key
- request
- variable set
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Multi Processors (AREA)
- Computer And Data Communications (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
分散したセンサノードを含むセンサネットワークにおける分散処理で、例えば1万台程度の大規模なセンサネットワークであっても迅速なデータ処理を実現する。変数セット101は、KeyとValueまたはKeyに対応する同期先を紐づけた変数のデータベースを記憶する。SFE102は、一つの状態において、自装置の変数セット101内の変数の参照または更新を要求する処理を含む処理を実行するとともに、変数を参照しながら条件を評価して他の状態に遷移する。変数同期103部は、要求が示すKeyに対応する変数に対して同期先が指定されていれば、同期先との間で要求が示すKeyを通信しながら、自装置の要求Keyに対応する変数のValueと同期先の要求Keyに対応する変数のValueとを同期させる。With distributed processing in a sensor network including distributed sensor nodes, rapid data processing is realized even in a large-scale sensor network of about 10,000 units, for example. The variable set 101 stores a database of variables in which a synchronization destination corresponding to Key and Value or Key is linked. In one state, the SFE 102 executes a process including a process for requesting reference or update of a variable in the variable set 101 of the own apparatus, and evaluates a condition while referring to the variable and transits to another state. If the synchronization destination is specified for the variable corresponding to the key indicated by the request, the variable synchronization 103 unit communicates the key indicated by the request with the synchronization destination, and the variable corresponding to the request key of the own device. And the value of the variable corresponding to the request key of the synchronization destination are synchronized.
Description
分散したセンサノードを含むセンサネットワークにおいて分散処理を行なうプログラム、装置、および方法に関する。 The present invention relates to a program, an apparatus, and a method for performing distributed processing in a sensor network including distributed sensor nodes.
アドホックネットワークをはじめとするセンサネットワークは、複数のセンサ付無線端末であるノードを空間に散在させ、それらが協調して通信を行い、環境や物理的状況を採取する、例えば無線によるマルチホップネットワークである。 Sensor networks, including ad hoc networks, are nodes that are multiple wireless terminals with sensors, scattered in space, communicate in cooperation, and collect environment and physical conditions. For example, wireless multi-hop networks is there.
ノードの仕様は、高性能のサーバ系のハードウェアに対して、限定された性能の組込装置である。CPUは例えば、センタサーバの64ビット/3.0ギガヘルツクロック処理に対して、ノードの8ビット/8メガヘルツクロック処理である。RAM(ランダムアクセスメモリ)は例えば、センタサーバの数十ギガバイト記憶容量に対して、ノードの数十キロバイト記憶容量である。ROM(リードオンリーメモリ)は例えば、センタサーバは持たないのに対して、ノードは数十キロバイト記憶容量のものを持つ。そして、通信仕様は例えば、センタサーバの有線による1ギガビット/秒に対して、ノードの無線による数十から数百キロビット/秒である。 The node specification is a built-in device with limited performance for high-performance server hardware. The CPU is, for example, a node 8-bit / 8 megahertz clock process as opposed to a 64-bit / 3.0 gigahertz clock process of the center server. A RAM (Random Access Memory) is, for example, a storage capacity of several tens of kilobytes of a node with respect to a storage capacity of several tens of gigabytes of a center server. For example, a ROM (read only memory) does not have a center server, but a node has a storage capacity of several tens of kilobytes. The communication specification is, for example, several tens to several hundreds of kilobits / second by wireless of the node with respect to 1 gigabit / second by wired center server.
代表的なトラフィックモデルは、多数(1万台規模)のノードが取得した数バイトのセンサデータをサーバへ送信する、マルチポイント対ポイント(Multipoint to Point:M2P)通信である。センサネットワーク上の各ノードと外部ネットワーク(インターネット等)上のサーバとの通信は、センサネットワーク上に配置されるゲートウェイによって中継する。従って、各ノードとゲートウェイの間の通信も、M2P通信になる。ノード対ゲートウェイ間のM2Pトラフィックと比較して、ノード間のポイント対ポイント(Point to Point:P2P)のトラフィックは少ない。 A typical traffic model is multipoint-to-point (M2P) communication in which several bytes of sensor data acquired by a large number (10,000 scales) of nodes are transmitted to a server. Communication between each node on the sensor network and a server on an external network (such as the Internet) is relayed by a gateway arranged on the sensor network. Accordingly, communication between each node and the gateway is also M2P communication. Compared to node-to-gateway M2P traffic, there is less point-to-point (P2P) traffic between nodes.
このようなセンサネットワークにおけるデータ処理モデルとしては、ノードからゲートウェイを介してサーバにデータを一括収集し、解析して得られた結果を制御装置へP2Pで返す方式が一般的である。定期的に一斉にデータがゲートウェイ、サーバに向かって集められ、サーバは情報を解析して結果をもとに特定のセンサノードに、P2Pで指示を出す。 As a data processing model in such a sensor network, a method is generally used in which data is collected from a node to a server via a gateway and the result obtained by analysis is returned to the control device in P2P. Data is gathered periodically and simultaneously toward the gateway and server, and the server analyzes the information and gives an instruction to a specific sensor node based on the result by P2P.
しかし、ノードの数が1万台等の大規模なセンサネットワークとなると、多量のデータによる処理時間の長時間化や、ネットワークの輻輳が生じてしまう。このため、分散処理を行なうことが望まれている。 However, when a large-scale sensor network having 10,000 nodes or the like is used, a long processing time due to a large amount of data or network congestion occurs. For this reason, it is desired to perform distributed processing.
センサネットワークで分散処理を行なおうとする場合、処理能力が低いセンサノードや、通信コストの低いノード間通信を考慮する必要がある。 When performing distributed processing in a sensor network, it is necessary to consider sensor nodes with low processing capability and communication between nodes with low communication costs.
また、無線によるセンサネットワークは、ノードの移動や無線の電波状況によって、構成が動的に変化する。大量のデータをデータセンタで一括収集する場合、トラフィックの集中箇所は予想困難である。従って、最終的に輻輳がゲートウェイ周辺で発生していた。 In addition, the configuration of a wireless sensor network changes dynamically depending on the movement of a node and the wireless radio wave condition. When a large amount of data is collected at a data center, traffic concentration points are difficult to predict. Therefore, congestion finally occurred around the gateway.
このような問題に対して、アドホックネットワークとセンタサーバの境界に複数のGWを配置する従来技術が知られている。センタサーバがノードへフレームを送信する際に効率の良いGWを記憶し、該当のGWを経由するようフレーム送信することで、ノードへのトラフィックを分散させて輻輳を回避するものである。 In order to solve such a problem, a conventional technique for arranging a plurality of GWs at the boundary between an ad hoc network and a center server is known. When the center server transmits a frame to a node, an efficient GW is stored, and the frame is transmitted so as to pass through the corresponding GW, thereby distributing traffic to the node and avoiding congestion.
しかし、この従来技術では、GW周辺の輻輳回避は効果が期待できるが、サーバに到着するフレーム数は変化せず、センタ集中型の処理モデルである。 However, in this prior art, avoiding congestion around the GW can be expected to be effective, but the number of frames arriving at the server does not change and is a center-intensive processing model.
また、種々のイベントを非同期に発生する複数の被管理コンピュータと、複数の被管理コンピュータのスケジュールおよび前記イベントを管理する管理コンピュータとを備えた従来技術が知られている。管理コンピュータは、イベントを一元的に管理する一元的管理手段を備え、一元的管理手段の管理結果に応じて次の処理に進むようにするものである。 Further, there is known a conventional technique including a plurality of managed computers that generate various events asynchronously, a schedule of the plurality of managed computers, and a management computer that manages the events. The management computer is provided with centralized management means for centrally managing events, and proceeds to the next processing according to the management result of the centralized management means.
しかし、この従来技術も、管理コンピュータがイベントとワークフローを一元管理するため、センタ集中型の処理モデルである。 However, this conventional technique is also a centralized processing model because the management computer centrally manages events and workflows.
上述のように、従来はセンタ集中型の処理モデルが通常であり、データ処理に時間を要し、迅速に応答することができないという問題点を有していた。例えば、1、000万件のデータを収集して処理する場合、1データの処理時間を100ms(ミリ秒)と仮定すると、100ms×1000万件=100万秒(≒12日)が必要となる。ビル管理システムの警報装置のように、センサによって侵入者の検知と同時に異常処理する用途にセンサネットワークを適用する場合、従来は、数百ノードの小規模ネットワークに適用が限定されてしまっていた。 As described above, conventionally, a center-centralized processing model is usually used, and it takes time for data processing and has a problem that it cannot respond quickly. For example, when collecting and processing 10 million pieces of data, assuming that the processing time of one data is 100 ms (milliseconds), 100 ms × 10 million cases = 1 million seconds (≈12 days) is required. . Conventionally, when a sensor network is applied to an application that performs abnormal processing simultaneously with detection of an intruder by a sensor, such as an alarm device of a building management system, the application has been limited to a small-scale network of several hundred nodes.
このように、センサネットワークのデータ処理で、センタ集中型モデルはノードからサーバにデータを収集・解析し、ノードへ応答する。しかし、大規模なセンサネットワークを構築した場合、トラフィックの輻輳とデータ解析時間の増大で迅速応答が困難であるという問題点を有していた。 As described above, in the data processing of the sensor network, the center centralized model collects and analyzes data from the node to the server, and responds to the node. However, when a large-scale sensor network is constructed, there is a problem that quick response is difficult due to traffic congestion and an increase in data analysis time.
本発明は、大規模なセンサネットワークであっても迅速なデータ処理を実現することを目的とする。 An object of the present invention is to realize rapid data processing even in a large-scale sensor network.
態様の一例では、センサを搭載したノード装置を構成要素として含むセンサネットワークにおいて分散処理を実行するコンピュータに、キーと値とキーに対応する同期先を紐づけた変数のデータベースを変数セットとして記憶する機能と、一つの状態において、自装置の変数セット内の変数の参照または更新を要求する処理を実行するとともに、自装置の変数セット内の変数を参照しながら条件を評価して他の状態に遷移させるステートフローエンジン機能と、自装置の変数セット内の変数が更新を要求する処理が実行された場合に、要求が示すキーに対応する変数に対して同期先が指定されていれば、同期先との間で要求が示すキーを通信し、自装置の変数セット内の要求が示すキーに対応する変数の値と同期先の変数セット内の要求が示すキーに対応する変数の値とを同期させる変数同期機能とを実行させるためのプログラムとして実現される。 In one example, a variable database in which a key, a value, and a synchronization destination corresponding to the key are linked is stored as a variable set in a computer that executes distributed processing in a sensor network including a node device equipped with a sensor as a component. Function and processing that requests the reference or update of variables in its own variable set in one state, and evaluates conditions while referring to variables in its own variable set, and enters other states. If the state flow engine function to be transitioned and the process in which the variable in the variable set of its own device is requested to be updated are executed, if the synchronization destination is specified for the variable corresponding to the key indicated by the request, The key indicated by the request is communicated with the destination, and the value of the variable corresponding to the key indicated by the request in the variable set of the local device and the request in the synchronization destination variable set are indicated. It is realized and the value of the variable corresponding to the key as a program for executing a variable synchronization function for synchronizing.
ノードの処理能力に応じて、フレキシブルに実行単位を変更し、処理を分散させることが可能となる。ノードでデータ処理することで、センタで大量のデータを解析する必要が無く迅速な応答が可能となる。分散した処理の同期は、集中管理方式でなく、P2Pによる変数同期で実現するのでネットワーク負荷が小さくて済む。これらにより、例えば1万台程度の大規模なセンサネットワークであっても迅速なデータ処理が可能となる。 Depending on the processing capability of the node, it is possible to change the execution unit flexibly and distribute the processing. By processing data at the node, it is not necessary to analyze a large amount of data at the center, and quick response is possible. The synchronization of distributed processing is realized not by a centralized management system but by variable synchronization by P2P, so that the network load can be reduced. As a result, for example, even a large-scale sensor network of about 10,000 units can perform rapid data processing.
以下、本発明を実施するための形態について図面を参照しながら詳細に説明する。
図1は、本発明の実施形態によるノード100の構成例を示す図である。本実施形態は、センサを搭載したノード100を構成要素として含むセンサネットワークにおいて分散処理を実行する分散処理装置として実現することができる。分散処理装置は例えば、ノードであり、またはゲートウェイであり、あるいはサーバである。図1の構成はノードの構成例を示しているが、ゲートウェイやサーバにおいても、同様の機能を実装することが可能である。ノード、ゲートウェイ、サーバ間の連携については、詳しく後述する。Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the drawings.
FIG. 1 is a diagram illustrating a configuration example of a node 100 according to an embodiment of the present invention. The present embodiment can be realized as a distributed processing apparatus that executes distributed processing in a sensor network including the node 100 on which the sensor is mounted as a component. The distributed processing device is, for example, a node, a gateway, or a server. Although the configuration of FIG. 1 shows a configuration example of a node, a similar function can be implemented also in a gateway or a server. The cooperation between nodes, gateways, and servers will be described in detail later.
図1において、変数セット(Variable Set:VS)(変数セット記憶部)101は、キー(以下「Key」と呼ぶ)と値(以下「Value」と呼ぶ)またはKeyに対応する同期先を紐づけた変数のデータベースとして記憶するものである。 In FIG. 1, a variable set (VS) (variable set storage unit) 101 associates a key (hereinafter referred to as “Key”) and a value (hereinafter referred to as “Value”) or a synchronization destination corresponding to the Key. Is stored as a database of variables.
ステートフローエンジン(State Flow Engine。以下「SFE」と呼ぶ)(ステートフローエンジン部)102は、一つの状態で、自ノード100の変数セット101内の変数の参照または更新を要求する処理を含む処理を実行する。また、SFE102は、自ノード100内の変数セット101内の変数を参照しながら条件を評価して他の状態に遷移する。SFE102の具体的な状態遷移処理は、コンテキストシート104を使って行われる。
A state flow engine (state flow engine, hereinafter referred to as “SFE”) (state flow engine unit) 102 includes processing for requesting reference or update of a variable in the
コンテキストシート(Context Sheet。以下「CS」と呼ぶ)104は、条件を記述した条件部または実行する処理を記述した処理部を含むコンテキストボックス(Context Box。以下「CB」と呼ぶ)105を組み合わせて状態遷移マシンを記述するファイルである。SFE102は、CS104に記述されているCB105を順次読み込む。また、SFE102は、読み込んだCB105の処理部を解釈して自ノード100の変数セット101内の変数の参照または更新を要求する処理を実行する機能を備える。そして、SFE102は、自ノード100の変数セット101内の変数を参照しながら読み込んだCB105の条件部を評価し、その評価の結果に応じて条件部をさらに評価しまたは他のCB105の読込みに遷移する。
なお、図1に示されるA〜nの内部プロセス106は、SFE102が各CB105を状態遷移させるときに実行されるプログラムの実行イメージである。A context sheet (Context Sheet; hereinafter referred to as “CS”) 104 is combined with a context box (Context Box; hereinafter referred to as “CB”) 105 including a condition part describing a condition or a processing part describing a process to be executed. This file describes the state transition machine. The
1 is an execution image of a program executed when the
変数同期(変数同期部)103は、SFE102によって自ノード100の変数セット101内の変数の参照または更新を要求する処理が実行された場合に、次の処理を実行する。変数同期103は通常は、要求が示すKeyに対応する変数を変数セット101上で検索し、検索されたKeyに対応するValueを参照または更新する。
The variable synchronization (variable synchronization unit) 103 executes the following processing when the processing for requesting reference or update of the variables in the
このとき、変数同期103は、更新要求が示すKeyに対応して変数セット101上で検索された変数に対して同期先が指定されていれば、その同期先との間で要求が示すKeyを通信する。そして、変数同期103は、自ノード100の変数セット101内の要求が示すKeyに対応する変数のValueと、同期先の変数セット101内の要求が示すKeyに対応する変数のValueとを同期させる。より具体的には、変数同期103は、自ノード100の変数セット101内のKeyに対する変数のValueを更新し、さらに同期先が示す変数セット101の更新を要求する要求メッセージを同期先に送信する。また、変数同期103は、同期先から更新要求メッセージを受信した場合は、自ノード100の変数セット101内のKeyに対する変数のValueを更新する。ここで、同期元と同期先のノード100の各変数同期103は、要求メッセージ(要求が示すKey)および応答メッセージを、例えばユニキャストで通信してよい。
At this time, if the synchronization destination is specified for the variable searched on the
CSVS(Context Sheet Variable Set)サーバ107は、通信装置109を介して、SFE102から読み取り可能なパスにCS104を配置するプログラムである。
A CSV (Context Sheet Variable Set)
OS(オペレーティングシステム)108は、ノード100のSFE102、変数同期103、CSVSサーバ107等のプログラム機能をCPU110上で実行するための基本機能を提供する。CPU110は、ノード100を動作させる中央演算処理装置のハードウェアである。通信装置109は、他のノード100との間の無線通信機能を実現するハードウェアである。
An OS (Operating System) 108 provides basic functions for executing program functions such as the
図2は、図1の変数セット101のデータ構造およびデータ構成例を示す図である。図2(a)のデータ構造に示されるように、変数セット101は、Key1、Key2等のKey(キー)ごとに、Value1、Value2等のValue(値)を記憶することができる。また、Keyごとに、同期先を記憶することができる。同期先は例えば、同期先の「ノード名/変数セット名/Key」をURIの形式で表記してよい。一つのKeyに対しては、Valueまたは同期先のいずれか一方または両方が登録される。KeyとValueまたは同期先の一組が、一つの変数を表す。
FIG. 2 is a diagram illustrating a data structure and a data configuration example of the
図2(b)は、変数セット101のデータ構成例を示している。Key=K1の変数に対して、Value=V0、同期先=ノード100=ノードB/変数セット101=VS1/Key=K1が登録されている。また、Key=K2の変数に対しては、Value=V1が登録されており、同期先は指定されていない。このような変数セット101のデータ構造に対して図1の変数同期103がアクセスする。この結果例えば、Key=K1の変数に対してValue=V0が更新されると、同期先であるノードB、変数セットVS1内のKey=K1に対応する変数のValueも同じ値に更新される。
FIG. 2B shows a data configuration example of the
図3は、図1のCS104内の一つのCB105のデータ構造を示す図である。CB105は、条件部と処理部とから構成される。条件部は複数の条件1、2、・・・、nを含むことができ、処理部も複数の処理a、b、・・・、nを含むことができる。図1のSFE102は、CB105を読み込んだときに、処理部内の各処理を実行するとともに、条件部内の各条件を順次評価する。各CB105は、条件部と処理部の両方を備えてもよいし、どちらか片方のみを備えてもよい。
FIG. 3 is a diagram showing a data structure of one
図4は、SFE102によるCS104内の各CB105の実行による状態遷移処理と、変数同期103によるノード100間の各変数セット101内の各変数の同期処理との関係を示す動作説明図である。
FIG. 4 is an operation explanatory diagram showing the relationship between the state transition process by the execution of each
例えばノード100(#A)のSFE102は、自ノード内のCS104を読み込み、最初のCB105(#1)の処理部(処理1、2)を実行するとともに、条件部(条件1、2)を順次評価する。この結果、例えば条件1の条件式が真になると、2番目のCB105(#2)への状態遷移が発生する。ノード100(#B)のSFE102も同様に、自ノード内のCS104を読み込み、最初のCB105(#1)の処理部(処理1、2)を実行するとともに、条件部(条件1)を評価する。この結果、例えば条件1の条件式が真になると、2番目のCB105(#2)への状態遷移が発生する。なお、ノード100(#B)のCB105(#1)やCB105(#2)は、ノード100(#A)のCB105(#1)やCB105(#2)とは異なってよい。SFE102は、終了を示すCB105に遷移した場合、評価を終了する。SFE102は、条件部のみ設定されたCB105については、状態遷移をするのみで、処理は実行しない。また、SFE102は、処理部のみ設定された条件部の設定が無いCB105については、状態遷移後に処理部で記述された処理を実行し、CS104の動作を終了する(終了を示すCB105などがこれに該当する)。
For example, the
ここで、ノード100(#A)のSFE102が、CB105(#2)の処理部内の処理1を実行した結果、例えば矢印401で示されるように、ノード100(#A)の変数セット101内のKey=K1の変数に対する更新要求が発生する。
Here, as a result of execution of the
ノード100(#A)の変数同期103は、SFE102によって上記更新要求の処理が実行された場合に、ノード100(#A)の変数セット101内のKey=K1の変数に対するValueを、V0からV1に更新する。
When the update request processing is executed by the
ノード100(#A)の変数同期103は、矢印402で示されるように、上記要求が示すKey=K1に対応する変数に対して、同期先=ノードB/VS1/K1(図2(b)参照)が指定されていることを認識する。
As indicated by the arrow 402, the
ノード100(#A)の変数同期103は、その同期先が示す、ノード100(#B)の変数セット101内のKey=K1に対応する変数のValueのV1への更新を要求する要求メッセージを、図1の通信装置109から送信する。この要求メッセージのパケットには、宛先としてノード100(#B)のアドレス、送信元としてノード100(#A)のアドレスが指定され、データ部には、同期先「VS1/K1」と更新データ「V1」が格納される。
The
この要求メッセージは、矢印403で示されるように、ノード100(#B)の通信装置109によって受信され、ノード100(#B)の変数同期103に渡される。
This request message is received by the
ノード100(#B)の変数同期103は、受信した要求メッセージを読むことにより、矢印404で示されるように、自ノードの変数セット101=VS1内のKey=K1に対応する変数を検索し、その変数のValueをV1に更新する。
By reading the received request message, the
ここで、ノード100(#B)のSFE102は、自ノード内のCS104を読むことにより、例えばCB105(#1)の条件1の条件式を評価する。このとき例えば、自ノードの変数セット101内のKey=K1に対応する変数への参照要求が発生する。ノード100(#B)の変数同期103は、上記参照要求が発生すると、自ノードの変数セット101内のKey=K1に対応する変数のValueを取得して、SFE102に返す。このようにして、ノード100(#B)のSFE102は、例えばCB105(#1)の条件1の条件式を評価することによって、自ノードの変数セット101内のKey=K1に対応する変数のValueがV0からV1に変更されたか否かを監視している。ノード100(#B)のSFE102は、例えばCB105(#1)の条件1の条件式の評価結果が偽である場合には、同じ条件1の条件式の評価を繰り返し実行する。ノード100(#B)のSFE102は、自ノードの変数セット101内のKey=K1に対応する変数のValueがV1に変更され、CB105(#1)の条件1の条件式の評価結果が真になると、CB105(#2)への状態遷移を発生させる。この結果、ノード100(#B)のSFE102は、新たなCB105(#2)の処理1、2を実行する。
Here, the
以上説明した図4に示されるようなノード100(#A)、ノード100(#B)間の変数同期の適用例としては、次のようなものが考えられる。ノード100(#A)は例えば一般家庭に設置されるガス漏れ警報センサである。ノード100(#B)は例えば、警備会社に設置されるガス漏れ通報装置である。ノード100(#B)は、図1による機能を実現できる限り、ゲートウェイやサーバに置き換えられてもよい。例えばノード100(#A)において、CB105(#1)の条件1が、ガスセンサの値を監視している。ガスセンサが異常値を示すと、CB105(#2)への状態遷移が発生する。ノード100(#A)のCB105(#2)では、処理2によってガス漏れ警報ブザーが鳴動させられる。これとともに、処理1によって、ノード100(#A)の変数セット101内のKey=K1に対応する変数のValueが、ガスが漏れていないことを示す値V0からガスが漏れていることを示す値V1に更新される。この更新に応答して、ノード100(#A)とノード100(#B)間の変数同期によって、警備会社にあるノード100(#B)の変数セット101内のKey=K1に対応する変数のValueが、ガスが漏れていることを示す値V1に同期して更新される。ノード100(#B)のガス漏れ通報装置では、CB105(#1)の条件1が、ノード100(#A)におけるガス漏れ発生を監視している。ノード100(#A)でのガス漏れ発生により、ノード100(#B)の変数セット101内のKey=K1に対応するValueがV1に更新されたことが、CB105(#1)の条件1の評価=真により検出される。この結果、ノード100(#B)において、CB105(#2)への状態遷移が発生する。ノード100(#B)のCB105(#2)では、処理1または2によってガス漏れの発生が警備会社の警報システムに表示され、ガス漏れに対して必要な処置が講じられる。
As an application example of variable synchronization between the node 100 (#A) and the node 100 (#B) as shown in FIG. 4 described above, the following can be considered. The node 100 (#A) is, for example, a gas leak alarm sensor installed in a general household. The node 100 (#B) is, for example, a gas leak notification device installed in a security company. The node 100 (#B) may be replaced with a gateway or a server as long as the function according to FIG. 1 can be realized. For example, in the node 100 (#A), the
以上の処理例において、ノード100(#A)においてガス漏れが発生していない状態においては、ノード100(#A)からノード100(#B)に対して通信トラフィックが発生することはない。ガス漏れが発生した場合のみ、変数同期に基づくP2Pの通信トラフィックが発生する。 In the above processing example, in a state where no gas leak occurs in the node 100 (#A), no communication traffic is generated from the node 100 (#A) to the node 100 (#B). Only when gas leakage occurs, P2P communication traffic based on variable synchronization occurs.
本実施形態により、ノード100側でCS104に基づくフレキシブルな実行単位で配置可能な分散処理が実現されることにより、処理(状態遷移)を分散させることが可能となる。これにより、ノード100のみでデータ処理することが可能となり、サーバ側で大量のデータを解析する必要がなくなり、サーバ側の処理を軽減して迅速な応答を行うことが可能となる。
According to the present embodiment, distributed processing that can be arranged in flexible execution units based on the
また、本実施形態では、不特定多数のノード100、ゲートウェイ、またはサーバが、変数セット101の各Keyに対応する同期先の情報によってそのKeyに対応する変数のValueを共有し、自律的に同期をとることができる。従来は、特定のサーバ等が各ノード100の状態を集中的に管理していたのとは異なる。この変数同期103の仕組みにより、通知することが必要な変数の情報のみを必要なタイミングで、ノード100から他のノード100またはゲートウェイ、サーバ等に、ユニキャスト(P2P)の通信で自律分散的に通知することが可能となる。この結果、1万台を超える規模が想定されるような大規模なセンサネットワークにおいても、トラフィックが分散されて輻輳の発生を回避することが可能となる。
In the present embodiment, a large number of unspecified nodes 100, gateways, or servers share the value of the variable corresponding to the key according to the synchronization destination information corresponding to each key in the
さらに、自律分散処理によって、一つのノード100の機能が停止しても、サーバ側の全体処理への影響を無くすことが可能となる。CB105と変数セット101のアップデートにより、ノード100での処理の変更や追加を容易に行うことも可能となる。
Furthermore, even if the function of one node 100 is stopped by the autonomous distributed processing, it is possible to eliminate the influence on the overall processing on the server side. By updating the
図5は、本実施形態をホームセキュリティシステムに適用した適用例の説明図である。
各家庭には、人感センサ501とドアセンサ502、照度センサ503が設置されている。FIG. 5 is an explanatory diagram of an application example in which the present embodiment is applied to a home security system.
In each household, a human sensor 501, a door sensor 502, and an illuminance sensor 503 are installed.
従来は、図5(a)の家Aとして示されるように、全てのセンサ501、502、503のデータが警備会社等のセンタ505に収集されて(センサデータの収集)、解析が行われていた(センサデータの解析II)。そして、分析結果が家Aに通知されていた(分析結果の通知III )。そのため、図6(a)に示されるように、ノード602の数が多くなると、図5(a)のセンサデータの収集において、GWやセンタ601に近いところで輻輳が発生しやすかった。また、図5(a)のセンサデータの解析IIのデータ処理の時間も、数日単位で必要であった。なお、図5(a)の分析結果の通知III におけるGWやセンタ601から各ノード602への通知は、P2P通信で行われる。 Conventionally, as shown as house A in FIG. 5A, data of all sensors 501, 502, and 503 are collected at a center 505 such as a security company (collection of sensor data) and analyzed. (Sensor data analysis II). The analysis result was notified to the house A (analysis result notification III). Therefore, as shown in FIG. 6A, when the number of nodes 602 increases, in the collection of sensor data in FIG. 5A, congestion is likely to occur near the GW and the center 601. In addition, the data processing time of sensor data analysis II in FIG. 5A is also required in units of several days. Note that the notification from the GW and the center 601 to each node 602 in the analysis result notification III in FIG. 5A is performed by P2P communication.
これに対して、本実施形態では、図5(b)の家Bとして示されるように、基本的に、センサネット側のホームサーバ504において、分散処理が実行される。具体的には、人感センサ501、ドアセンサ502、照度センサ503をそれぞれ構成する各ノードと、ホームサーバ504は、図1に示される本実施形態の構成を備えている。各センサ501、502、503からの各センサデータは、本実施形態による変数同期103(図5(b)の変数同期)によって、ホームサーバ504内の変数セット101の対応する各変数との間で同期がとられる。そして、ホームサーバ504内のSFE102が、自装置のCS104の各CB105(図1)による状態遷移処理を実行する(図5(b)の状態遷移処理II)。この結果、警備会社等のセンタ505へ通知する必要が生じた場合に、ホームサーバ504のSFE102が、所定のCB105の処理を実行することにより、自装置の変数セット101の該当する変数のValueを更新する。この変数には、センタ505内の変数セット101の変数が同期先として指定されており、これによってホームサーバ504とセンタ505とで各センサ501、502、503の状態に関する同期がとられる。
On the other hand, in this embodiment, as shown as house B in FIG. 5B, basically, distributed processing is executed in the home server 504 on the sensor network side. Specifically, each node constituting the human sensor 501, the door sensor 502, and the illuminance sensor 503, and the home server 504 have the configuration of this embodiment shown in FIG. 1. Each sensor data from each sensor 501, 502, 503 is exchanged with each corresponding variable of the
このような構成により、例えば警報機作動等の緊急処理は、センタ505を介することなく、ホームサーバ504側のSFE102によって迅速に分散処理することが可能となる。同時に、各センサ501、502,503とホームサーバ504との間の変数同期103、およびホームサーバ504とセンタ505との間の変数同期103によって、センタ505への通知も例えば異常時のみ効率的に行うことが可能となり、ネットワークの輻輳を回避することができ、スケーラビリティが向上する。
With such a configuration, emergency processing such as alarm operation can be quickly distributed and processed by the
図7は、図5(b)のホームセキュリティの適用例におけるホームサーバ504でのCB105の状態遷移例と変数セット101の更新例を示した図である。
FIG. 7 is a diagram illustrating a state transition example of the
変数セット101内の各Key「HumanSensor」「DoorSensor」「LightSensor」に対応する各Valueは、変数同期103によって、図5(b)の各センサ501、502、503のノードから自動更新される。各Valueは、「false」または「true」の値をとり得る。Key「HumanSensor」のValueが「true」になると、人感センサ501のONが検知される。Key「DoorSensor」のValueが「true」になると、ドアセンサ502のONが検知される。Key「LightSensor」のValueが「true」になると、照度センサ503のONが検知される。
Each Value corresponding to each Key “HumanSensor”, “DoorSensor”, and “LightSensor” in the
図7に示されるように、各センサ501、502、503の検知(ON)をトリガとして、順次状態遷移が発生する。異常が無い場合の状態遷移をドア開閉センサ502がON→照度センサ503がON→人感センサ501がONの順として、セキュリティシステムを解除し、これ以外を異常と判断し警報機を作動させる。 As shown in FIG. 7, state transitions occur sequentially with the detection (ON) of each sensor 501, 502, 503 as a trigger. In the order of the state transition when there is no abnormality, the door opening / closing sensor 502 is turned on, the illuminance sensor 503 is turned on, and the human sensor 501 is turned on, and the security system is released.
開始CB105「OwnerGoOut」から順次状態遷移し、終了CB105である「OwenrGetHome」または「TheifEntered」まで状態遷移する。
State transition is made sequentially from the
CS104を読み込んだ直後の状態は図7の初期状態であり、「OwnerGoOut」のCB105へ状態遷移する。「OwnerGoOut」は処理が指定されていない。従って、処理部は実行されない。次に、「OwnerGoOut」の条件部の評価を条件1から開始する。
The state immediately after reading the
条件1が「true」(Key「HumanSensor」のValueが「true」)の場合、CB105「ThiefEntered」へ遷移する(図7のII)。「ThiefEntered」のCB105は、処理として警報機を作動させる。「ThiefEntered」のCB105は条件が設定されていない。従って、このCB105で実行を終了する。
When the
初期状態で、条件1が「false」(Key「HumanSensor」のValueが「false」)の場合、条件2を評価する。条件2が「true」(Key「DoorSensor」のValueが「true」)なら、「DoorOpen」のCB105へ遷移する(図7のIII )。条件2が「false」(Key「DoorSensor」のValueが「false」)なら、条件3を評価する。
In the initial state, when the
以下同様にして、終了を示すCB105まで順次状態遷移し、処理部を実行する。
図8は、図1の構成のホームセキュリティシステムへの適用例で、センサノード501、502、503、ホームサーバ504、およびセンタ505で分散処理を行う場合のCB105の状態遷移例と変数セット101の更新例を示した図である。In the same manner, the state is sequentially changed to
FIG. 8 shows an application example of the configuration of FIG. 1 to the home security system. The state transition example of the
人感センサ501のノード100のSFE102は、「HumanSensorOn」のCB105が登録されたCS104を実行する。これにより、上記SFE102は、人感センサ501の出力(ONまたはOFF)をチェックし、その結果を人感センサ501のノードの変数セット101内のKey「HumanSensor」に対応するValueに書き込む。この時、Key「HumanSensor」には、同期先としてホームサーバ504=ホームサーバBの変数セット101「VS1」内のKey「HumanSensor」(「ホームサーバB/VS1/HumanSensor」)が指定されている。従って、人感センサ501が「HumanSensor」にValueを書き込んだ直後、人感センサ501内の変数同期103がホームサーバ504(ホームサーバB)内の変数同期103と通信を行う。そして、ホームサーバ504内の変数同期103が、ホームサーバ504の変数セット101「VS1」内のKey「HumanSensor」のValueを更新する。
The
同様に、ドアセンサ502と照度センサ503は各々のセンサ出力を確認し、それぞれ自ノードのKey「DoorSensor」及び「LightSnesor」の各Valueを更新する。そして、各センサ502、503内の各ノードの変数同期103は、同期先のホームサーバ504(ホームサーバB)の変数同期103と通信を実行する。これにより、ホームサーバ504の変数セット101「VS1」内の各Key「DoorSensor」及び「LightSnesor」の各Valueを更新する。
Similarly, the door sensor 502 and the illuminance sensor 503 confirm the respective sensor outputs, and update the respective values of the keys “DoorSensor” and “LightSensor” of the own node. Then, the
ホームサーバ504(ホームサーバB)は、人感センサ501、ドアセンサ502、照度センサ503のそれぞれに対応する各Keyの各Valueにより、CB105を状態遷移させ実行している。図7中のII、IV、Vのいずれかの状態遷移に合致した場合、ホームサーバ504のSFE102は、「TheifEntered」のCB105へ遷移する。この時、ホームサーバ504(ホームサーバB)のSFE102は、警報機を作動させる処理を実行するとともに、センタ通報の処理を実行する。ホームサーバ504のSFE102および変数同期103は、センタ通報の処理を実行することにより、自装置内の変数セット101のKey「Alert」のValueを「true」に更新する。そして、同期先のセンタ505(警備会社)の変数セット101のKey「Alert_HomeB」のValueを「true」に更新して、警報が行われる。
The home server 504 (home server B) changes the state of the
図9は、図1のSFE102の制御動作を示すフローチャートである。この制御動作は、図1のCPU110およびOS108が、特には図示しないメモリに記憶された制御プログラムを実行する処理として実現される。
FIG. 9 is a flowchart showing the control operation of the
SFE102が処理を開始すると、まず自装置内のCS104(図1)を読み込む(ステップS901)。
When the
次に、SFE102は、CS104に登録されている開始CB105を、アクティブなCB105に設定する(ステップS902)。これにより、開始CB105に対応する内部プロセス106が生成される。
Next, the
SFE102は、生成された内部プロセス106上で、アクティブにされたCB105(最初は開始CB105)の処理部(図3参照)の実行を開始する(ステップS903)。処理部の実行においては、自装置の変数セット101内のKeyの変数に対する更新要求または参照要求を、自装置の変数同期103に対して発行することができる。例えば、図4で、ノード100(#A)のSFE102が、CB105(#2)の処理部内の処理1を実行する場合である。この場合には、前述したように、例えば矢印401で示されるように、ノード100(#A)の変数セット101内のKey=K1の変数に対する更新要求が発生する。あるいは例えば、図8で、ホームサーバ504のSFE102が、「ThiefEntered」のCB105の処理部内の処理「センタ通報」を実行することにより、自サーバの変数セット101内のKey「Alert」のValueを「false」から「true」に更新するような場合である。なお、SFE102は、処理部の実行において、変数更新以外に、例えばセンサのハードウェアの出力確認を行うような処理も実行することができる。例えば、図8で、人感センサ501のノードのSFE102が、「HumanSensorOn」のCB105の処理部内の処理「人感センサの出力確認」を実行するような場合である。
The
SFE102は、処理部を実行した後、現在のアクティブなCB105が終了を示しているか否かを判定する(ステップS904)。終了を示すCB105であるか否かは、そのCB105に条件部(図3参照)が設定されているか否かで判定できる。
After executing the processing unit, the
条件部が設定されていなければ、ステップS903でそのCB105の処理部が実行された後、他のCB105に状態遷移することはないので、SFE102は、そのままCS104の処理を終了する(ステップS904の判定がYES)。
If the condition part is not set, after the processing part of the
現在のアクティブなCB105が終了を示してなくステップS904の判定がNOならば、SFE102は、アクティブなCB105の条件部を取得する(ステップS905)。
If the current
CB105の条件部には、図3で説明したように、複数の条件(条件文)1〜nを登録することができる。そこで、条件部内の各条件を条件ポインタによって指し示す。SFE102はまず、条件ポインタを、条件部内の最上位の条件文にセットする(ステップS906)。
As described in FIG. 3, a plurality of conditions (conditional sentences) 1 to n can be registered in the condition part of the
SFE102は、条件文を評価する(ステップS907)。条件文に変数が含まれていれば、SFE102は、自装置内の変数セット101(図1参照)内のその変数に対応するKeyのValueの参照要求を、自装置内の変数同期103(図1参照)に対して発行する。この結果、変数同期103から返されるValueを用いて、その変数を含む条件文を評価する。例えば、図4で、ノード100(#B)のSFE102が、例えばCB105(#1)の条件1の条件式を評価することによって、自ノードの変数セット101内のKey=K1に対応する変数のValueを評価するような場合である。なお、SFE102は、条件文の評価において、変数参照以外に、例えばセンサのハードウェア出力を評価することによって、センサがONになっているか否かを確認するような評価を行ってもよい。例えば、図8で、人感センサ501のノードのSFE102が「HumanSensorOn」のCB105の条件部の条件「人感センサはON?」を評価するような場合である。
The
SFE102は、条件文を評価した後、その条件文が真であるか否かを判定する(ステップS908)。
After evaluating the conditional statement, the
条件文が真ではなく(偽であって)、ステップS908の判定がNOならば、SFE102は、条件ポインタを次へ移動する(ステップ909)。
If the conditional statement is not true (false) and the determination in step S908 is NO, the
SFE102は、次には条件部には条件文がそれ以上なく条件ポインタが空であるか否かを判定する(ステップS910)。
Next, the
条件ポインタが空でなくステップS910の判定がNOならば、ステップS907の処理に移動して、条件ポインタが新たに指し示す次の条件文の評価を繰り返し実行する。例えば、図7において、「OwnerGoOut」のCB105の条件部が評価されるときに、条件1が偽である場合には条件2が評価され、さらに条件2も偽である場合には条件3が評価されるような場合である。
If the condition pointer is not empty and the determination in step S910 is NO, the process moves to step S907, and the next conditional statement newly pointed to by the condition pointer is repeatedly evaluated. For example, in FIG. 7, when the condition part of the
条件部に条件文がそれ以上なく条件ポインタが空になってステップS910の判定がYESになると、次の処理が実行される。SFE102は、変数同期103から自装置の変数セット101内のいずれかの変数が他装置(ノード、サーバ、ゲートウェイ等)によって更新された旨を通知されることを例えば一定時間待ち合わせる(ステップS911)。例えば、図8で、センタ505のSFE102が「MonitoringSecurity」のCB105の各条件「ホームサーバA通報?」および「ホームサーバB通報?」の評価を終了した後に待合せを行う処理である。ここでは例えば、自サーバの変数セット101内のKey「Alert_HomeA」の変数またはKey「Alert_HomeB」の変数が、ホームサーバ504等からの変数同期によって更新されることが、待ち合わせられる。あるいは、SFE102は、センサの出力が変化することを一定時間待ち合わせるような処理を実行してもよい。例えば、図8で、人感センサ501のSFE102が「HomeSensorOn」のCB105の条件「人感センサはOn?」の評価を終了した後に待合せを行う処理である。ここでは例えば、人感センサ501のハードウェア出力が変化することが一定時間待ち合わせる。
If there are no more conditional statements in the condition part and the condition pointer becomes empty and the determination in step S910 becomes YES, the following processing is executed. The
その後、SFE102は、ステップS906の処理に戻って、条件ポインタを再び現在のアクティブなCB105の条件部の最上位の条件文にセットし、上述したステップS907からS910で示される各条件文の評価処理を繰り返し実行する。
After that, the
ステップS908の判定で条件文が真であると判定された場合、SFE102は、現在のアクティブなCB105の処理を終了し、そのCB105が示す次のCB105にジャンプ(状態遷移)する(ステップS908の判定がYES→ステップS912)。例えば、図4で、ノード100(#B)のSFE102が、自ノードの変数セット101内のKey=K1に対応する変数のValueがV1に変更されてCB105(#1)の条件1の条件式の評価結果が真になったことを判定したような場合である。この場合、SFE102は、CB105(#2)への状態遷移を発生させる。あるいは、図7において、「OwnerGoOut」のCB105の条件1の評価が真となって、「ThiefEntered」のCB105に状態遷移するような場合である。
If it is determined in step S908 that the conditional statement is true, the
以上のようにして、SFE102は、状態遷移を行いながら、CS104内の各CB105の処理部の実行または条件部の評価を行い、自装置(ノード、ゲートウェイ、サーバ等)における分散処理を実行することが可能となる。
As described above, the
図10は、図1の変数同期103における変数更新処理(その1)の制御動作を示すフローチャートである。この制御動作は、変数同期103が、自装置内のSFE102からの変数の更新要求を受け付けて処理するものである。この制御動作は、図1のCPU110およびOS108が、特には図示しないメモリに記憶された制御プログラムを実行する処理として実現される。
FIG. 10 is a flowchart showing the control operation of the variable update process (part 1) in the
変数同期103はまず、SFE102からの変数の更新要求を待ち合わせる(ステップS1001。要求があったか否かを判定し(ステップS1002)、なければ待合せを繰り返す(ステップS1002の判定がNO→S1001の繰り返し)。
The
SFE102からの変数の更新要求が発生しステップS1002の判定がYESになると、変数同期103は、以下の一連の処理を実行する。例えば、図4で、ノード100(#A)のSFE102が、CB105(#2)の処理部内の処理1を実行した結果、矢印401で示されるように、ノード100(#A)の変数セット101内のKey=K1の変数に対する更新要求が発生したような場合である。
When a variable update request is generated from the
まず、変数同期103は、更新要求に含まれるKeyにより、自装置内の変数セット101(図2参照)を検索する(ステップS1003)。
First, the
変数同期103は、Keyに対する変数が見つかったか否かを判定する(ステップS1004)。
The
Keyに対する変数が見つかってステップS1004の判定がYESになると、変数同期103は、変数セット101上で、更新要求に含まれるKeyに対応する変数のValueを、更新要求に含まれるValueによって更新する(ステップS1005)。例えば、図4で、ノード100(#A)の変数同期103が、SFE102によって更新要求の処理が実行された場合に、ノード100(#A)の変数セット101内のKey=K1の変数に対するValueを、V0からV1に更新するような場合である。
If a variable for the key is found and the determination in step S1004 is YES, the
続いて、変数同期103は、更新要求に含まれるKeyに対応する変数に同期先(図2参照)が含まれているか否かを判定する(ステップS1006)。
Subsequently, the
同期先が含まれておらずステップS1006の判定がNOならば、変数同期103は、ステップS1001およびS1002の待合せ処理に戻る。
If the synchronization destination is not included and the determination in step S1006 is NO, the
同期先が含まれておりステップS1006の判定がYESになると、変数同期103は、その同期先に、更新要求メッセージを、図1の通信装置109から送信する(ステップS1007)。このとき、特には図示しないが、更新要求メッセージのヘッダには、そのメッセージの種類が更新要求であることを示す情報が付加される。その後、変数同期103は、ステップS1001およびS1002の待合せ処理に戻る。例えば、図4で、ノード100(#A)の変数同期103が、矢印402で示されるように、上記要求が示すKey=K1に対応する変数に対して、同期先=ノードB/VS1/K1が指定されていることを認識する。そして、ノード100(#A)の変数同期103が、その同期先が示す、ノード100(#B)の変数セット101内のKey=K1に対応する変数のValueのV1への更新を要求する要求メッセージを送信する。なお、更新要求メッセージの送信後に、更新結果を同期先から受信するような処理が含まれてもよい(後述する図11のS1112の通知に対応する)。
If the synchronization destination is included and the determination in step S1006 is YES, the
更新要求に含まれるKeyにより変数セット101を検索した結果、Keyに対する変数が見つからずステップS1004の判定がNOならば、変数同期103は次の処理を実行する。変数同期103は、更新要求に含まれるKeyとValueまたは同期先を、自装置の変数セット101に、例えば図2(a)に示されるデータ形式で新たに登録する(ステップS1008)。その後、変数同期103は、ステップS1001およびS1002の待合せ処理に戻る。
As a result of searching the
図11は、図1の変数同期103における変数更新処理(その2)の制御動作を示すフローチャートである。この制御動作は、図10のステップS1007または後述する図12のステップS1208によって他装置内の変数同期103から自装置に対して送信された更新要求メッセージを、自装置の変数同期103が受信して処理するものである。この制御動作は、図1のCPU110およびOS108が、特には図示しないメモリに記憶された制御プログラムを実行する処理として実現される。
FIG. 11 is a flowchart showing the control operation of the variable update process (part 2) in the
変数同期103はまず、他ノード(ゲートウェイやサーバであってもよい)からの変数の更新要求メッセージを待ち合わせる(ステップS1101)。図1の通信装置109によって、メッセージが受信されたか否かを判定し(ステップS1102)、受信がなければ待合せを繰り返す(ステップS1102の判定がNO→S1101の繰り返し)。
First, the
更新要求メッセージの受信が発生しステップS1102の判定がYESになると、変数同期103は、以下の一連の処理を実行する。例えば、図4で、ノード100(#A)から送信された要求メッセージが、矢印403で示されるように、ノード100(#B)で受信され、ノード100(#B)の変数同期103に渡されたような場合である。
When the update request message is received and the determination in step S1102 is YES, the
更新要求メッセージを受信し、ステップS1102の判定がYESならば、変数同期103は、更新要求メッセージに含まれるKeyにより、自装置内の変数セット101(図2参照)を検索する(ステップS1110)。
If the update request message is received and the determination in step S1102 is YES, the
変数同期103は、Keyに対する変数が見つかったか否かを判定する(ステップS1111)。
The
Keyに対する変数が見つかってステップS1111の判定がYESになると、変数同期103は、変数セット101上で、見つかったKeyに対応する変数のValueを、更新要求メッセージに含まれるValueによって更新する。そして、変数同期103は、更新結果を更新要求メッセージの送信元に通知する(以上、ステップS1112)。その後、変数同期103は、ステップS1101およびS1102の待合せ処理に戻る。例えば、図4で、ノード100(#B)の変数同期103が、矢印404で示されるように、自ノードの変数セット101=VS1内のKey=K1に対応する変数を検索し、その変数のValueをV1に更新するような場合である。
If a variable for the key is found and the determination in step S1111 is YES, the
Keyに対する変数が見つからずステップS1111の判定がNOならば、変数同期103は次の処理を実行する。変数同期103は、更新要求に含まれるKeyとValueを自装置の変数セット101に、例えば図2(a)に示されるデータ形式で新たに登録する(ステップS1113)。その後、変数同期103は、ステップS1101およびS1102の待合せ処理に戻る。
If no variable for Key is found and the determination in step S1111 is NO,
図12は、図1の変数同期103における変数参照処理の制御動作を示すフローチャートである。この制御動作は、変数同期103が、自装置内のSFE102からの変数の参照要求を受け付けて処理するものである。この制御動作は、図1のCPU110およびOS108が、特には図示しないメモリに記憶された制御プログラムを実行する処理として実現される。
FIG. 12 is a flowchart showing the control operation of the variable reference process in the
変数同期103はまず、SFE102からの変数の参照要求を待ち合わせる(ステップS1201。要求があったか否かを判定し(ステップS1202)、なければ待合せを繰り返す(ステップS1202の判定がNO→S1201の繰り返し)。
The
SFE102からの変数の参照要求が発生しステップS1202の判定がYESになると、変数同期103は、以下の一連の処理を実行する。例えば、図4で、ノード100(#B)のSFE102が、例えばCB105(#1)の条件1の条件式を評価するときに、自ノードの変数セット101内のKey=K1に対応する変数への参照要求が発生するような場合である。
When a variable reference request is generated from the
まず、変数同期103は、参照要求で指定されたKeyで、自装置内の変数セット101(図2参照)を検索する(ステップS1203)。
First, the
変数同期103は、Keyに対する変数が存在するか否かを判定する(ステップS1204)。
The
Keyに対する変数が存在しステップS1204の判定がYESになると、変数同期103は、変数セット101上で、参照要求に含まれるKeyに対応する変数のValueの同期先(図2参照)を調べる(ステップS1205)。
If there is a variable for the key and the determination in step S1204 is YES, the
変数同期103はさらに、自ノード(ゲートウェイまたはサーバであってもよい)の変数セット101上で、参照要求に含まれるKeyに対応する変数のValueが存在するか否かを判定する(ステップS1206)。
The
Valueが存在してステップS1206の判定がYESならば、変数同期103は、自ノード等上のそのValueを、参照結果としてSFE102に通知する(ステップS1207)。その後、変数同期103は、ステップS1201およびS1202の待合せ処理に戻る。
If a value exists and the determination in step S1206 is YES, the
Valueが存在せずステップS1206の判定がNOならば、変数同期103は、参照要求に含まれるKeyに対応する変数の同期先により指定された参照先へ、参照要求メッセージを、通信装置109(図1)を介して送信する(ステップS1208)。
If there is no value and the determination in step S1206 is NO, the
変数同期103は、参照先からの上記参照要求メッセージに対応する応答メッセージを待ち合わせる(ステップS1209)。図1の通信装置109によって、応答メッセージが正常に受信されたか否かを判定し(ステップS1210)、受信がなければ待合せを繰り返す(ステップS1210の判定がNO→S1209の繰り返し)。
The
応答メッセージが正常に受信されステップS1210の判定がYESになると、変数同期103は、応答メッセージから参照結果を抽出し、SFE102に通知する(ステップS1211)。その後、変数同期103は、ステップS1201およびS1202の待合せ処理に戻る。
When the response message is normally received and the determination in step S1210 is YES, the
図13は、上記システムをソフトウェア処理として実現できるコンピュータのハードウェア構成の一例を示す図である。 FIG. 13 is a diagram illustrating an example of a hardware configuration of a computer that can realize the system as software processing.
図13に示されるコンピュータは、CPU1301、メモリ1302、入力装置1303、出力装置1304、外部記憶装置1305、可搬記録媒体1309が挿入される可搬記録媒体駆動装置1306、及び通信インタフェース1307を有し、これらがバス1308によって相互に接続された構成を有する。同図に示される構成は上記システムを実現できるコンピュータの一例であり、そのようなコンピュータはこの構成に限定されるものではない。
The computer shown in FIG. 13 includes a
CPU1301は、当該コンピュータ全体の制御を行う。メモリ1302は、プログラムの実行、データ更新等の際に、外部記憶装置1305(或いは可搬記録媒体1309)に記憶されているプログラム又はデータを一時的に格納するRAM等のメモリである。CUP1301は、プログラムをメモリ1302に読み出して実行することにより、全体の制御を行う。
The
入出力装置1303は、ユーザによるキーボードやマウス等による入力操作を検出し、その検出結果をCPU1301に通知し、CPU1301の制御によって送られてくるデータを表示装置や印刷装置に出力する。
The input /
外部記憶装置1305は、例えばハードディスク記憶装置である。主に各種データやプログラムの保存に用いられる。
The
可搬記録媒体駆動装置1306は、光ディスクやSDRAM、コンパクトフラッシュ(登録商標)等の可搬記録媒体1309を収容するもので、外部記憶装置1305の補助の役割を有する。
The portable recording
通信インタフェース1307は、例えばLAN(ローカルエリアネットワーク)又はWAN(ワイドエリアネットワーク)の通信回線を接続するための装置である。
The
本実施形態によるシステムは、図9から図12のフローチャート等で実現される機能を搭載したプログラムをCPU1301が実行することで実現される。そのプログラムは、例えば外部記憶装置1305や可搬記録媒体1309に記録して配布してもよく、或いはネットワーク接続装置1307によりネットワークから取得できるようにしてもよい。
The system according to the present embodiment is realized by the
以上説明しようにして、本実施形態により、センサネットワークを構成するノード、ゲートウェイ、サーバで分散処理を実現することが可能となる。 As described above, according to the present embodiment, distributed processing can be realized by nodes, gateways, and servers constituting a sensor network.
本実施形態では、ノード100の処理能力に応じて、フレキシブルに実行単位(CB105)を変更し、処理を分散させることが可能となる。 In the present embodiment, the execution unit (CB 105) can be flexibly changed according to the processing capability of the node 100, and the processing can be distributed.
本実施形態では、ノード100でデータ処理することで、センタで大量のデータを解析する必要が無く迅速な応答が可能となる。 In the present embodiment, data processing is performed by the node 100, so that it is not necessary to analyze a large amount of data at the center, and a quick response is possible.
本実施形態では、分散した処理の同期は、集中管理方式でなく、P2Pによる変数同期で実現するので、ネットワーク負荷を小さくすることが可能となる。 In this embodiment, the synchronization of distributed processing is realized not by a centralized management method but by variable synchronization by P2P, so that the network load can be reduced.
本実施形態では、一つのノード100を止めても全体処理に影響しないようにすることが可能となる。 In the present embodiment, even if one node 100 is stopped, it is possible not to affect the overall processing.
そして、本実施形態では、ノード100等における処理の変更・追加を、CB105の単位で容易に行うことが可能となる。
In the present embodiment, it is possible to easily change or add processing in the node 100 or the like in units of the
Claims (12)
キーと値と前記キーに対応する同期先を紐づけた変数のデータベースを変数セットとして記憶する機能と、
一つの状態において、自装置の前記変数セット内の変数の参照または更新を要求する処理を実行するとともに、前記自装置の前記変数セット内の変数を参照しながら条件を評価して他の状態に遷移させるステートフローエンジン機能と、
前記自装置の前記変数セット内の変数の参照または更新を要求する処理が実行された場合に、前記要求が示すキーに対応する変数に対して、前記同期先との間で前記要求が示すキーを通信し、前記自装置の前記変数セット内の前記要求が示すキーに対応する変数の値と前記同期先の前記変数セット内の前記要求が示すキーに対応する変数の値とを同期させる変数同期機能と、
を実行させるためのプログラム。In a computer that executes distributed processing in a sensor network,
A function of storing a variable database in which a key, a value, and a synchronization destination corresponding to the key are linked as a variable set;
In one state, a process for requesting reference or update of a variable in the variable set of the own device is executed, and a condition is evaluated while referring to a variable in the variable set of the own device to enter another state. Stateflow engine function to make transition,
The key indicated by the request with the synchronization destination with respect to the variable corresponding to the key indicated by the request when processing for requesting reference or update of the variable in the variable set of the own device is executed A variable that synchronizes the value of the variable corresponding to the key indicated by the request in the variable set of the device and the value of the variable corresponding to the key indicated by the request in the variable set of the synchronization destination Sync function
A program for running
前記自装置の前記変数セット内の変数の参照または更新を要求する処理が実行された場合に、前記変数セットにおいて、前記要求が示すキーに対応する変数の値を参照または更新する機能と、
前記要求が示すキーに対応する変数に対して前記同期先が指定されていれば、前記同期先が示す前記変数セットの更新を要求する要求メッセージを前記同期先に送信する機能と、
同期元装置から前記要求メッセージを受信した場合に、前記要求メッセージが示す前記自装置の前記変数セットにおいて、前記要求メッセージが示すキーに対応する変数の値を更新する機能と、
を含むことを特徴とする請求項1に記載のプログラム。The variable synchronization function is
A function for referring to or updating a value of a variable corresponding to a key indicated by the request in the variable set when processing for requesting reference or update of a variable in the variable set of the device is performed;
If the synchronization destination is specified for a variable corresponding to the key indicated by the request, a function of transmitting a request message for requesting update of the variable set indicated by the synchronization destination to the synchronization destination;
A function of updating a value of a variable corresponding to a key indicated by the request message in the variable set of the own device indicated by the request message when the request message is received from a synchronization source device;
The program according to claim 1, comprising:
条件を記述した条件部または実行する処理を記述した処理部を含むコンテキストボックスを組み合わせて状態遷移マシンを記述するファイルであるコンテキストシートに記述されている前記コンテキストボックスを順次読み込む機能と、
前記読み込んだコンテキストボックスの前記処理部を解釈して前記自装置の前記変数セット内の変数の参照または更新を要求する処理を含む処理を実行する機能と、
前記自装置の前記変数セット内の変数を参照しながら前記読み込んだコンテキストボックスの前記条件部を評価し、前記評価の結果に応じて前記条件部をさらに評価しまたは他の前記コンテキストボックスの読込みに遷移する機能と、
を含むことを特徴とする請求項1または2のいずれかに記載のプログラム。The state flow engine function is
A function for sequentially reading the context boxes described in the context sheet which is a file describing a state transition machine by combining a context box including a condition part describing a condition or a processing part describing a process to be executed;
A function for executing processing including processing for interpreting the processing unit of the read context box and requesting reference or update of a variable in the variable set of the own device;
The condition part of the read context box is evaluated while referring to the variables in the variable set of the own device, and the condition part is further evaluated according to the evaluation result or another context box is read. The transition function,
The program according to claim 1, comprising:
ことを特徴とする請求項1ないし3のいずれかに記載のプログラム。The variable synchronization function communicates the key indicated by the request with the synchronization destination by unicast.
The program according to any one of claims 1 to 3, wherein
キーと値と前記キーに対応する同期先を紐づけた変数のデータベースを変数セットとして記憶する変数セット記憶部と、
一つの状態において、自装置の前記変数セット内の変数の参照または更新を要求する処理を実行するとともに、前記自装置の前記変数セット内の変数を参照しながら条件を評価して他の状態に遷移させるステートフローエンジン部と、
前記自装置の前記変数セット内の変数の更新を要求する処理が実行された場合に、前記要求が示すキーに対応する変数に対して、前記同期先との間で前記要求が示すキーを通信し、前記自装置の前記変数セット内の前記要求が示すキーに対応する変数の値と前記同期先の前記変数セット内の前記要求が示すキーに対応する変数の値とを同期させる変数同期部と、
を備えることを特徴とする分散処理装置。An apparatus for performing distributed processing in a sensor network,
A variable set storage unit that stores a database of variables in which a key, a value, and a synchronization destination corresponding to the key are linked as a variable set;
In one state, a process for requesting reference or update of a variable in the variable set of the own device is executed, and a condition is evaluated while referring to a variable in the variable set of the own device to enter another state. A state flow engine section for transition,
When processing for requesting update of a variable in the variable set of the own device is executed, a key indicated by the request is communicated to the synchronization destination with respect to a variable corresponding to the key indicated by the request. And a variable synchronization unit that synchronizes the value of the variable corresponding to the key indicated by the request in the variable set of the own device and the value of the variable corresponding to the key indicated by the request in the variable set of the synchronization destination When,
A distributed processing apparatus comprising:
前記自装置の前記変数セット内の変数の更新を要求する処理が実行された場合に、前記変数セットにおいて、前記要求が示すキーに対応する変数の値を更新する機能と、
前記要求が示すキーに対応する変数に対して前記同期先が指定されていれば、前記同期先が示す前記変数セットの更新を要求する要求メッセージを前記同期先に送信する機能と、
同期元装置から前記要求メッセージを受信した場合に、前記要求メッセージが示す前記自装置の前記変数セットにおいて、前記要求メッセージが示すキーに対応する変数の値を更新し、前記参照の結果を含む前記応答メッセージを前記同期元装置に返信する機能と、
を備えることを特徴とする請求項5に記載の分散処理装置。The variable synchronization unit is
A function for updating a value of a variable corresponding to a key indicated by the request in the variable set when processing for requesting update of a variable in the variable set of the device is performed;
If the synchronization destination is specified for a variable corresponding to the key indicated by the request, a function of transmitting a request message for requesting update of the variable set indicated by the synchronization destination to the synchronization destination;
When the request message is received from the synchronization source device, in the variable set of the own device indicated by the request message, the value of the variable corresponding to the key indicated by the request message is updated, and the reference result is included. A function of returning a response message to the synchronization source device;
The distributed processing apparatus according to claim 5, further comprising:
条件を記述した条件部または実行する処理を記述した処理部を含むコンテキストボックスを組み合わせて状態遷移マシンを記述するファイルであるコンテキストシートに記述されている前記コンテキストボックスを順次読み込む機能と、
前記読み込んだコンテキストボックスの前記処理部を解釈して前記自装置の前記変数セット内の変数の参照または更新を要求する処理を含む処理を実行する機能と、
前記自装置の前記変数セット内の変数を参照しながら前記読み込んだコンテキストボックスの前記条件部を評価し、前記評価の結果に応じて前記条件部をさらに評価しまたは他の前記コンテキストボックスの読込みに遷移する機能と、
を備えることを特徴とする請求項5または6のいずれかに記載のプログラム。The state flow engine unit is
A function for sequentially reading the context boxes described in the context sheet which is a file describing a state transition machine by combining a context box including a condition part describing a condition or a processing part describing a process to be executed;
A function for executing processing including processing for interpreting the processing unit of the read context box and requesting reference or update of a variable in the variable set of the own device;
The condition part of the read context box is evaluated while referring to the variables in the variable set of the own device, and the condition part is further evaluated according to the evaluation result or another context box is read. The transition function,
The program according to claim 5, further comprising:
ことを特徴とする請求項5ないし7のいずれかに記載の分散処理装置。The variable synchronization unit communicates the key indicated by the request with the synchronization destination by unicast.
The distributed processing apparatus according to claim 5, wherein:
キーと値と前記キーに対応する同期先を紐づけた変数のデータベースを変数セットとして記憶し、
一つの状態において、自装置の前記変数セット内の変数の参照または更新を要求する処理を実行するとともに、前記自装置の前記変数セット内の変数を参照しながら条件を評価して他の状態に遷移させるステートフローを実行し、
前記自装置の前記変数セット内の変数の更新を要求する処理が実行された場合に、前記要求が示すキーに対応する変数に対して、前記同期先との間で前記要求が示すキーを通信し、前記自装置の前記変数セット内の前記要求が示すキーに対応する変数の値と前記同期先の前記変数セット内の前記要求が示すキーに対応する変数の値とを同期させる変数同期を実行する、
ことを備えることを特徴とする分散処理方法。A method for executing distributed processing in a sensor network,
Store a variable database associating a key, a value, and a synchronization destination corresponding to the key as a variable set,
In one state, a process for requesting reference or update of a variable in the variable set of the own device is executed, and a condition is evaluated while referring to a variable in the variable set of the own device to enter another state. Execute the state flow to transition,
When processing for requesting update of a variable in the variable set of the own device is executed, a key indicated by the request is communicated to the synchronization destination with respect to a variable corresponding to the key indicated by the request. Variable synchronization that synchronizes the value of the variable corresponding to the key indicated by the request in the variable set of the own device and the value of the variable corresponding to the key indicated by the request in the variable set of the synchronization destination. Run,
A distributed processing method characterized by comprising:
前記自装置の前記変数セット内の変数の更新を要求する処理が実行された場合に、前記変数セットにおいて、前記要求が示すキーに対応する変数の値を更新し、
前記要求が示すキーに対応する変数に対して前記同期先が指定されていれば、前記同期先が示す前記変数セットの更新を要求する要求メッセージを前記同期先に送信し、
同期元装置から前記要求メッセージを受信した場合に、前記要求メッセージが示す前記自装置の前記変数セットにおいて、前記要求メッセージが示すキーに対応する変数の値を更新し、前記参照の結果を含む前記応答メッセージを前記同期元装置に返信する、
ことを備えることを特徴とする請求項9に記載の分散処理方法。In performing the variable synchronization,
When processing for requesting update of a variable in the variable set of the device is executed, the value of the variable corresponding to the key indicated by the request is updated in the variable set,
If the synchronization destination is specified for the variable corresponding to the key indicated by the request, a request message for requesting update of the variable set indicated by the synchronization destination is transmitted to the synchronization destination,
When the request message is received from the synchronization source device, in the variable set of the own device indicated by the request message, the value of the variable corresponding to the key indicated by the request message is updated, and the reference result is included. Returning a response message to the synchronization source device;
The distributed processing method according to claim 9, further comprising:
条件を記述した条件部または実行する処理を記述した処理部を含むコンテキストボックスを組み合わせて状態遷移マシンを記述するファイルであるコンテキストシートに記述されている前記コンテキストボックスを順次読み込み、
前記読み込んだコンテキストボックスの前記処理部を解釈して前記自装置の前記変数セット内の変数の参照または更新を要求する処理を含む処理を実行し、
前記自装置の前記変数セット内の変数を参照しながら前記読み込んだコンテキストボックスの前記条件部を評価し、前記評価の結果に応じて前記条件部をさらに評価しまたは他の前記コンテキストボックスの読込みに遷移する、
ことを備えることを特徴とする請求項9または10のいずれかに記載の分散処理方法。In the execution of the state flow,
The context boxes described in the context sheet, which is a file describing the state transition machine, are sequentially read by combining a condition box including a condition part describing a condition or a processing part describing a process to be executed,
Interpreting the processing unit of the read context box and executing a process including a process of requesting reference or update of a variable in the variable set of the own device;
The condition part of the read context box is evaluated while referring to the variables in the variable set of the own device, and the condition part is further evaluated according to the evaluation result or another context box is read. Transition,
The distributed processing method according to claim 9, further comprising:
ことを備えることを特徴とする請求項9ないし11のいずれかに記載の分散処理方法。In execution in the variable synchronization, the key indicated by the request is communicated by unicast with the synchronization destination.
The distributed processing method according to claim 9, further comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014507217A JPWO2013145254A1 (en) | 2012-03-30 | 2012-03-30 | Program, apparatus, and method for executing distributed processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014507217A JPWO2013145254A1 (en) | 2012-03-30 | 2012-03-30 | Program, apparatus, and method for executing distributed processing |
Publications (1)
Publication Number | Publication Date |
---|---|
JPWO2013145254A1 true JPWO2013145254A1 (en) | 2015-08-03 |
Family
ID=53772845
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014507217A Pending JPWO2013145254A1 (en) | 2012-03-30 | 2012-03-30 | Program, apparatus, and method for executing distributed processing |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPWO2013145254A1 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006344017A (en) * | 2005-06-09 | 2006-12-21 | Hitachi Ltd | Sensor network system and data processing method for sensor network system |
JP2008056394A (en) * | 2006-08-30 | 2008-03-13 | Hitachi Ltd | Sensor network system and data management method of sensor network |
JP2009171497A (en) * | 2008-01-21 | 2009-07-30 | Hitachi Ltd | Sensor net server, and sensor net system |
-
2012
- 2012-03-30 JP JP2014507217A patent/JPWO2013145254A1/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006344017A (en) * | 2005-06-09 | 2006-12-21 | Hitachi Ltd | Sensor network system and data processing method for sensor network system |
JP2008056394A (en) * | 2006-08-30 | 2008-03-13 | Hitachi Ltd | Sensor network system and data management method of sensor network |
JP2009171497A (en) * | 2008-01-21 | 2009-07-30 | Hitachi Ltd | Sensor net server, and sensor net system |
Non-Patent Citations (1)
Title |
---|
JPN6015021593; Athanassios Boulis et al.: '"Design and Implementation of a Framework for Efficient and Programmable Sensor Networks"' Proceedings of MobiSys 2003:The First International Conference on Mobile Systems, Applications, and , 20030508, pages:187-200 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2013145254A1 (en) | Program, device, and method for executing distributed processing | |
Xu et al. | Scalable cloud–sensor architecture for the Internet of Things | |
JP6549351B2 (en) | Collection of data within process control system and distribution to big data machines | |
JP6645740B2 (en) | Big data management in process control systems | |
Kamburugamuve et al. | Survey of distributed stream processing for large stream sources | |
CN106709003A (en) | Hadoop-based mass log data processing method | |
Belgaum et al. | Role of artificial intelligence in cloud computing, IoT and SDN: Reliability and scalability issues | |
Hinze et al. | Principles and applications of distributed event-based systems | |
Yassein et al. | Combined software-defined network (SDN) and Internet of Things (IoT) | |
JP2017508228A (en) | Distributed rules engine for robust sensor networks | |
KR20180083948A (en) | Distributed embedded data and knowledge management system integrated with PLC historian | |
JPWO2015141220A1 (en) | Information processing apparatus and monitoring method | |
Yoneki et al. | Unified semantics for event correlation over time and space in hybrid network environments | |
Shen et al. | Beam: Ending monolithic applications for connected devices | |
Rashid et al. | A survey on behavioral pattern mining from sensor data in Internet of Things | |
CN104281980A (en) | Remote diagnosis method and system for thermal generator set based on distributed calculation | |
Lakehal et al. | A semantic event based framework for complex situations modeling and identification in smart environments | |
Lachhab et al. | Performance evaluation of linked stream data processing engines for situational awareness applications | |
Qin et al. | Quality-aware sensor data management | |
Oprea et al. | Internet of things, challenges for demand side management | |
Bernabé-Sánchez et al. | Problem detection in the edge of IoT applications | |
JPWO2013145254A1 (en) | Program, apparatus, and method for executing distributed processing | |
Huru et al. | BigClue: Towards a generic IoT cross-domain data processing platform | |
Wang | Reliability analysis of social network data transmission in wireless sensor network topology | |
KR20190077926A (en) | Iot device monitoring framework, fog server equipped with the same and fog computing system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150602 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150803 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20160301 |